Listing of Articles in folder

Author Message

Majkl Najt

Tuesday 31 August 2004 4:13:57 pm

Hi!

I created new class. Also amde template for it and it works.
Now I created folder in this object where I am storing Articles in it.
I want to display now article titles in template for this class.
But to list all articles I need to put in id of the folder, which contains articles.
This code works as I wanted, but only becasuse I gave node ID 230 in it. How to get ID of the folder from template?

{section loop=fetch( content, list, hash( parent_node_id, 230, class_filter_type, include, class_filter_array, array( 'article' ), sort_by,array(published,false()), limit, 6) ) } 
	<li> {$item.object.published|l10n(shortdate)}<a href={$item.url_alias|ezurl}>{$item.object.data_map.title.content}</a></li>
				{/section}

Thanks!

Majkl

Majkl Najt

Wednesday 01 September 2004 12:58:30 am

I managed to get somehow node ID. Well printing it out with this code

{let folder_list=fetch( content, list, hash(parent_node_id, $node.node_id,sort_by, array( array( priority ))))}
<ul>
{section name=Folder loop=$folder_list}
<li><a href={concat("/",$Folder:item.url_alias)|ezroot}>{$Folder:item.node_id|wash}</a></li>
{$folder_list.node_id}
{/section}
</ul>

Bot now how to transfer item.node_id to my other section?

Majkl

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 01:24:43
Script start
Timing: Jan 31 2025 01:24:43
Module start 'layout'
Timing: Jan 31 2025 01:24:43
Module start 'content'
Timing: Jan 31 2025 01:24:43
Module end 'content'
Timing: Jan 31 2025 01:24:43
Script end

Main resources:

Total runtime0.0233 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1328151.2109
Module start 'layout' 0.00550.0037 739.3438220.6875
Module start 'content' 0.00920.0127 960.0313997.8047
Module end 'content' 0.02190.0014 1,957.835929.9922
Script end 0.0233  1,987.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002510.8739140.0002
Check MTime0.00114.5111140.0001
Mysql Total
Database connection0.00094.056110.0009
Mysqli_queries0.002510.935230.0008
Looping result0.00000.052110.0000
Template Total0.00104.310.0010
Template load0.00083.362910.0008
Template processing0.00020.930410.0002
Override
Cache load0.00052.188110.0005
General
dbfile0.00114.774980.0001
String conversion0.00000.030740.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