How to know the used siteaccess

Author Message

Paul Etienney

Thursday 30 October 2008 4:51:46 am

Hi,

I would like to know the siteaccess which is used. Is there a variable or fetch function or even a tip to get this information ?

Thank you very much.

Paul

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Paul Etienney

Thursday 30 October 2008 5:12:56 am

I auto-solve my problem :

There is a variable to know the siteaccess. This is $access_type

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Andrew Duck

Thursday 30 October 2008 5:13:16 am

Hi Paul,

If you are working within a template you should be able to use $access_type as documented at http://ez.no/doc/ez_publish/technical_manual/4_0/templates/the_pagelayout/variables_in_pagelayout

If you are working in php $GLOBALS['eZCurrentAccess'] shoud contain the same information.

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

Paul Etienney

Tuesday 04 November 2008 10:28:00 am

Hi de-solve my problem

I am in a template but i can't use the $access_type variable.

It can be used only in the pagelayout.tpl.

Do you have an idea ?

Thank you.

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

Paul Etienney

Monday 10 November 2008 1:37:54 am

Hello,

I did not find any solution.

Is it possible tu use pure php in a node template ? How to use $GLOBALS['eZCurrentAccess'] in a template ?

Thanks

Paul

-- Good websites creation --
My site : http://www.pauletienney.com
Twitter : http://www.twitter.com/p_etienney

michiel n.

Monday 10 November 2008 3:09:43 am

Last time I got confused about which siteaccess was being used, I used the debug output. In your site.ini:

[SiteAccessSettings]
DebugAccess=enabled
DebugExtraAccess=enabled

See http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/site_ini/siteaccesssettings/debugaccess

When you want to use php in a template (which I don't recommend,) you could use http://ezpedia.org/wiki/en/ez/wrap_operator

Certified eZ developer looking for projects.
michieln at gmail dot com
http://ez.no/certification/verify/225305

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 18 2025 11:20:23
Script start
Timing: Jan 18 2025 11:20:23
Module start 'layout'
Timing: Jan 18 2025 11:20:23
Module start 'content'
Timing: Jan 18 2025 11:20:24
Module end 'content'
Timing: Jan 18 2025 11:20:24
Script end

Main resources:

Total runtime1.1549 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.9141152.6250
Module start 'layout' 0.00780.0040 740.539139.4609
Module start 'content' 0.01191.1415 780.0000621.4453
Module end 'content' 1.15340.0014 1,401.445316.1641
Script end 1.1549  1,417.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3572160.0003
Check MTime0.00140.1225160.0001
Mysql Total
Database connection0.00090.076910.0009
Mysqli_queries1.080993.5893680.0159
Looping result0.00070.0643660.0000
Template Total1.116196.620.5581
Template load0.00250.218120.0013
Template processing1.113696.425020.5568
Template load and register function0.00010.011310.0001
states
state_id_array0.00140.122510.0014
state_identifier_array0.00210.179020.0010
Override
Cache load0.00210.1856390.0001
Sytem overhead
Fetch class attribute can translate value0.00060.054830.0002
Fetch class attribute name0.00130.110590.0001
XML
Image XML parsing0.00290.255030.0010
class_abstraction
Instantiating content class attribute0.00000.0019120.0000
General
dbfile0.00310.2674300.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs