SOrting the first article or info page of a list. How to ?

Author Message

laurent le cadet

Monday 01 September 2003 10:40:31 am

Hi,

Here's the way I use to sort a list of folder :

{let folder_list=fetch( content, list, hash( parent_node_id, 162, sort_by, array( array( priority )) ) )}

and the links :

{section name=Folder loop=$folder_list}<a href={concat( "/content/view/full/", $Folder:item.node_id,"/" )|ezurl}>{$Folder:item.name|wash}</a> | {/section}

When I click on the a link, I reach the section with it sub menu (articles, info pages,..) but the main area {$module_result.content} is empty.

What I want is to show directly the first arcticle or info page of the folder (sorting by priority, date...).

Is it possible ?

Laurent.

Stéphane Cloutier

Monday 01 September 2003 12:46:10 pm

You should check this out :

http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/one_article_folder

Another solution is to fill up the empty space by typing some text in your folder class.

Qupanuaq - Snow bunting

laurent le cadet

Tuesday 02 September 2003 1:10:15 am

Stéphane,

Thanks for the "Tips & Tricks" but in my case it seems to be useless.
I can't manage to show the first info page of the folder in the main area.
And filling the empty space is not ok because the design of folder class is not what I need.

I'm looking for a more simple way than changing evreythings.

Thanks again for repplying.

Laurent

Bjørn Kaarstein

Tuesday 02 September 2003 1:25:34 am

Hi Laurent.

If you try to use a
{section loop=fetch(content, list, hash( 'parent_node_id', 162,'limit', 1, sort_by, array( array( priority )) ) )}
in front of your folder_list, you'll be able to display your first article in a full view.

If you only want this to be valid for node 162, just put it inside a switch/case matching on $node.node_id.

What you need to do for {$module_result.content} is to write an override for your article class and info page, and specify them in override.ini.append. Clear your cache and you should have something to display..

I usually just write a few words in these overrides first, just to check that the correct files are being used.

Regards Bjørn.

laurent le cadet

Tuesday 02 September 2003 7:28:12 am

Hi Bjørn,

I don't think things are really clear for everybody or it's only confused for me.

I try another explanation :

The first "let" sort a list of folder on the top of each pages of the site wich is my navigation menu. Each folder contain info pages.

By clicking on an item of this menu, actually, I manage to build a sub menu with the titles of the info pages.

Finally, what I want is to show the sub menu (wich is in a cell of the page layout) and the full view of the first info page in the main area.

Sorry if my first explanation wasn't clear enough.

Laurent.

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 18 2025 22:18:15
Script start
Timing: Jan 18 2025 22:18:15
Module start 'layout'
Timing: Jan 18 2025 22:18:15
Module start 'content'
Timing: Jan 18 2025 22:18:16
Module end 'content'
Timing: Jan 18 2025 22:18:16
Script end

Main resources:

Total runtime0.7124 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.6016152.6563
Module start 'layout' 0.00560.0027 742.257839.5078
Module start 'content' 0.00830.7026 781.7656598.5078
Module end 'content' 0.71090.0015 1,380.273416.0938
Script end 0.7124  1,396.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4843160.0002
Check MTime0.00130.1868160.0001
Mysql Total
Database connection0.00080.109110.0008
Mysqli_queries0.647790.9153650.0100
Looping result0.00070.0939630.0000
Template Total0.679295.320.3396
Template load0.00200.276120.0010
Template processing0.677295.063720.3386
Template load and register function0.00010.014910.0001
states
state_id_array0.00200.284710.0020
state_identifier_array0.00090.130620.0005
Override
Cache load0.00170.2422460.0000
Sytem overhead
Fetch class attribute can translate value0.00050.074830.0002
Fetch class attribute name0.00160.230870.0002
XML
Image XML parsing0.00120.164030.0004
class_abstraction
Instantiating content class attribute0.00000.002590.0000
General
dbfile0.00110.1576220.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs