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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:16:46
Script start
Timing: Jan 31 2025 04:16:46
Module start 'layout'
Timing: Jan 31 2025 04:16:46
Module start 'content'
Timing: Jan 31 2025 04:16:46
Module end 'content'
Timing: Jan 31 2025 04:16:46
Script end

Main resources:

Total runtime0.0136 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1250151.2109
Module start 'layout' 0.00520.0019 739.335936.6328
Module start 'content' 0.00710.0051 775.968890.0000
Module end 'content' 0.01220.0013 865.968829.9922
Script end 0.0135  895.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002316.7399140.0002
Check MTime0.00107.3007140.0001
Mysql Total
Database connection0.00085.555910.0008
Mysqli_queries0.001914.209730.0006
Looping result0.00000.089610.0000
Template Total0.00107.210.0010
Template load0.00075.408310.0007
Template processing0.00021.730710.0002
Override
Cache load0.00053.957010.0005
General
dbfile0.00139.238880.0002
String conversion0.00000.043940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs