Share » Forums » Setup & design » Right menu / node list flexibility

Right menu / node list flexibility

Right menu / node list flexibility

Thursday 07 April 2005 2:30:14 am - 6 replies

Author Message

Bård Farstad

Wednesday 20 April 2005 1:06:44 am

Hi Laurent,

if you want to have the right hand content context oriented like here on ez.no then you should alter your content model. Here on ez.no we use a class called information page which has the following attributes:
* Title
* Body
* Right info

The right info is simply an XML text field which is displayed to the right, if enabled. We have a checkbox in the class to enable/disable this feature.

This is a simple and flexible solution to this.

--bård

Documentation: http://ez.no/doc

laurent le cadet

Wednesday 20 April 2005 2:33:13 am

Hi Bård,

I nearly did the same by adding a XML field call infos to the standard article.
I tryed to place this...

{section show=$node.object.data_map.infos.content.is_empty|not}
<div class="infos">
{attribute_view_gui attribute=$node.object.data_map.infos}
</div>
{/section}

directly under

{tool_bar name=right view=full}

in the pagelayout. Everything is ok BUT I have to clear the cahe each time I want to see the content ;)

Should I try to make it your way (checkbox or something else) or do you have another syntaxe for the cache problem ?

Laurent.

Bård Farstad

Wednesday 20 April 2005 2:45:22 am

Laurent,

regarding cache: we have this right information in the view (article/folder) template directly. Then the cache is handled like normal objects.

If you place this in the pagelayout then you should cache it with cache-block. But remember to make the node ID part of the cache key. Cache blocks are purged on publishing by default.

--bård

Documentation: http://ez.no/doc

laurent le cadet

Wednesday 20 April 2005 3:32:44 am

you mean :

{cache-block}
{section show=$node.object.data_map.infos.content.is_empty|not}
<div class="infos">
{attribute_view_gui attribute=$node.object.data_map.infos}
</div>
{/section}
{/cache-block}

Could you help me for the node ID and cache key ?

I read that I haven't to specify any Key because it's comon for all case, but it doesn't seems to work that way...

Bård Farstad

Wednesday 20 April 2005 4:03:56 am

Laurent,

You can supply keys as parameters to the cache block. E.g:

{cache-block keys=$node_id} 
... 
{/cache-block}

This is only needed if you have the code placed in pagelayout. If you are using a view template, then caching is already handled by eZ publish.

Information about the cache blocks can also be found here:
http://www.ez.no/ez_publish/documentation/development/kernel/cache_block_optimization

--bård

Documentation: http://ez.no/doc

laurent le cadet

Wednesday 20 April 2005 6:25:20 am

Hi again,

This is ok but persistent. If I print a new article with content in it's "infos" xml field, there still the previous content on right hand :(

Laurent

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

36 542 Users on board!

Forums menu