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.