Template - Which is the active siteaccess?

Author Message

Felix Woldt

Wednesday 10 May 2006 10:22:33 am

How can i find out which siteaccess is currently used?

Which variable is used?

I am looking for something like this

<i>{$var1.var2.var3}</i>

to have access to the information

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

Kristof Coomans

Wednesday 10 May 2006 10:30:51 am

Hi Felix

Welcome to the eZ community!

In the pagelayout you'll have the variable $access_type.

On http://ez.no/doc/ez_publish/technical_manual/3_7/templates/the_pagelayout/variables_in_pagelayout you'll find a list of variables available in the pagelayout, in case you need others.

Good luck!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Alex Holt

Wednesday 25 June 2008 11:37:39 am

i can't get $access_type.name to work inside an embed template override. Anyone have any ideas?

The issue is.. the content/view/line.tpl is being used to render an object that is embedded in a ezxmltext box.. and when embedded like that.. the access type appears to not be available.

Override code:

[rate_tables_link]
Source=content/view/line.tpl
MatchFile=rate_table_line.tpl
Subdir=templates
Match[class_identifier]=rate_table

Template code:

{$access_type.name}

-----------------
ezpublish 4
php 5.1.2
centos 5

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 09:04:19
Script start
Timing: Jan 19 2025 09:04:19
Module start 'layout'
Timing: Jan 19 2025 09:04:19
Module start 'content'
Timing: Jan 19 2025 09:04:19
Module end 'content'
Timing: Jan 19 2025 09:04:19
Script end

Main resources:

Total runtime0.0168 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.2734152.6406
Module start 'layout' 0.00560.0033 741.914139.4766
Module start 'content' 0.00890.0059 781.390689.4922
Module end 'content' 0.01480.0020 870.882834.3047
Script end 0.0168  905.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002515.0125140.0002
Check MTime0.00116.6952140.0001
Mysql Total
Database connection0.00095.178210.0009
Mysqli_queries0.002715.838430.0009
Looping result0.00000.071010.0000
Template Total0.00169.610.0016
Template load0.00095.565610.0009
Template processing0.00074.047210.0007
Override
Cache load0.00063.808810.0006
General
dbfile0.00148.489080.0002
String conversion0.00000.048240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs