|
Alexei Pechekhonov
|
Thursday 05 June 2003 9:25:44 am
Comment38023
Thank you, Bard. Now i'm feeling myself more confidence :)
Couldn't you, please, demonstrate your ideas on my example?
Every section on my site has a few lists: menu, line-view, midle-view etc ...
e.g.
loop=list1,
loop=list2,
loop=list3 <--- + some internal loop4
Right? In let/default area i define 3 of them, then i use {set}, but it depends on section, so i need, like you've suggested, to use path/url var ( say $DesignKeys:used.node)for uniquness then cache-block:
{let list1 list2 list3 } {cache-block keys=array($list1, $list2, $list3, $DesignKeys:used.node}
{set list1=fetch(content,list,hash(parent_node_id, $DesignKeys:used.node ...)}
{set list2=fetch(content,list,hash(parent_node_id, $DesignKeys:used.node ....)} {set list3=fetch(content,list,hash( parent_node_id, $DesignKeys:used.node ....)}
some_funny_code ...
{section loop=list1 show=....} show_zone1 {/section}
{section loop=list2 show=....} show_zone2 {/section}
{section loop=list3 show=....} show_zone3 ...internal_loop4... {/section}
. . . . . . . . . . . . . . . . . . . . . .
{/cache-block} {/let}
Yes, the "structure" of lists is the same, but parent_node_id is various from section to section. Please correct me or share, please, another suitable point of view.
|