Share » Forums » Developer » Sections: Help ME!!!

Sections: Help ME!!!

Sections: Help ME!!!

Thursday 16 March 2006 11:34:21 am - 2 replies

Author Message

Ɓukasz Serwatka

Thursday 16 March 2006 11:30:30 pm

Ad.1)
In pagelayout you can use {$DesignKeys:used.section}. In full view you can use {$node.object.section_id}

Ad.2)
Not sure what you mean here, but you can check user role and do some action.

{def $current_user=fetch( 'user', 'current_user' )}

Then check:

{$current_user.roles|attribute}

More about ezrole objects
http://ez.no/doc_hidden/ez_publish/technical_manual/3_6/reference/objects/ezrole

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

hugo esparza

Friday 17 March 2006 12:13:10 pm

thanks Lukasz.

The first part I work myself without problems, but second no, so having the idea I did the following thing:

{let user=fetch( 'user', 'current_user' )}
	{let rol_usuario=$user.role_id_list|implode(', ')}
	{section show=eq($rol_usuario,'9')}
			<a href={"A"|ezurl}>
	{/section}
	{section show=eq($rol_usuario,'11')}
			<a href={"B"|ezurl}>
	{/section}
	{section show=eq($rol_usuario,'13')}
			<a href={"C"|ezurl}>
	{/section}
  {/let}
{/let}

Not this very pretty the code, but I work myself what wanted to do

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu