Forums / Setup & design / SOrting the first article or info page of a list. How to ?

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.

eZ debug

Timing: Jan 19 2025 04:22:49
Script start
Timing: Jan 19 2025 04:22:49
Module start 'content'
Timing: Jan 19 2025 04:22:50
Module end 'content'
Timing: Jan 19 2025 04:22:51
Script end

Main resources:

Total runtime1.3274 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0082 590.3281180.7969
Module start 'content' 0.00831.1285 771.1250603.6172
Module end 'content' 1.13680.1906 1,374.7422337.3359
Script end 1.3273  1,712.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3040210.0002
Check MTime0.00140.1083210.0001
Mysql Total
Database connection0.00070.051510.0007
Mysqli_queries1.245893.85332020.0062
Looping result0.00200.15232000.0000
Template Total1.285896.920.6429
Template load0.00210.154620.0010
Template processing1.283896.712420.6419
Template load and register function0.00010.008210.0001
states
state_id_array0.00170.128010.0017
state_identifier_array0.00210.160420.0011
Override
Cache load0.00180.1345460.0000
Sytem overhead
Fetch class attribute can translate value0.00120.092940.0003
Fetch class attribute name0.00100.074570.0001
XML
Image XML parsing0.00270.204740.0007
class_abstraction
Instantiating content class attribute0.00000.001190.0000
General
dbfile0.00630.4779330.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs