Forums / Setup & design / Navigation Question...

Navigation Question...

Author Message

Douglas Johnson

Monday 28 July 2003 11:57:52 am

I have a folder in the content section, within that folder is an article. I would like the user to be able to click a link for the folder(node id) and display the article within. Question, how do I display an article based on a folder(node_id) click? I know how to display an article based on an article id click. Thanks in advance. Doug Johnson

Bjørn Kaarstein

Tuesday 29 July 2003 1:53:21 am

Say your folders is on root level.

{let folderlist=fetch('content', 'list', hash(parent_node_id,2,sort_by, array( array( priority, true() ) ) ))}

<table>
{section name=toppmeny loop=$folderlist}
<tr>
<TD> <a href={concat('/',$toppmeny:item.url_alias)|ezroot}{$toppmeny:item.name|wash}>{$:item.name}</a></TD>
</tr>
{/section}
</table>
{/let}

Then you need to call {module_result.content}, and write an override for your folder class. In that override you'll fetch from the article in the same way as you do when displaying on node_id.

Regards Bjørn