Share » Forums » Setup & design » Left menu with ViewCaching=true

Left menu with ViewCaching=true

Left menu with ViewCaching=true

Saturday 29 March 2003 10:23:21 am - 4 replies

Author Message

Paulo Almeida

Saturday 29 March 2003 7:19:33 pm

Well i found the solution by myself.
1º the script doesn't worked because with ViewCaching=true the variable $node doesn't exist

2º i can get section_id in variable $module_result, so i don't need $node anymore

3º i found a better way to implement like this:

{let children=fetch('content','list',hash(parent_node_id,40))}
{section name=Child loop=$children}
<div class="menu{cond($module_result.section_id|eq($Child:item.object.section_id),"on","off")}">
<a href={$Child:item.url_alias|ezurl}>{$Child:item.name}</a>
</div>
{/section}

Regards
Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.com

Tony Wood

Sunday 30 March 2003 11:32:04 pm

Paulo,

You can also use $DesignKeys:used.node To view all DesignKeys use this in the body of your document {$DesignKeys:used|attribute(show, 1)} to show all the variables available.

I hope this helps

Tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Paulo Almeida

Monday 31 March 2003 9:22:36 am

Hi

$DesignKeys:used.node is the id, with this i need to fetch the node to get section_id. With $module_result.section_id, is "direct".

Thanks
Paulo Almeida

PACPI.COM Internet Consulting
http://pacpi.com

Mads Buus Jensen

Thursday 12 June 2003 7:40:32 am

Hello,

I've solved it using a big
{let node=fetch('content','node',hash(node_id,$DesignKeys:used.node)) }

...

{/let}
around my whole pagelayout.tpl

Mads Buus Jensen

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

36 542 Users on board!

Forums menu