Forums / Setup & design / Problem with directory listing

Problem with directory listing

Author Message

David Barker

Sunday 24 August 2003 11:46:23 am

Hey,
My site is going great but I have a problem...
When you view a folder normally on my site, the objects in that folder are listed in the order I created them (the newest at the bottom) but I need them to be arranged alphabetically.

If you view the same folder in the admin view, they are arranged alphabetically (yay!) but I don't know how to make it so that they are in the view a user would see.

I've tried going to the folder's properties and saying arrange my "Name" but that doesn't make any difference on the user's view. Hmmm...

Thanks,
David

Bjørn Kaarstein

Monday 25 August 2003 2:22:49 am

You will have to specify this in your template fetch.

Something like:

fetch('content', 'list', hash('parent_node_id', $node.node_id,
'sort_by', $node.sort_array)

Regards Bjørn

David Barker

Monday 25 August 2003 4:58:43 am

I'm afraid that doesn't help :(

How come it doesn't order it by name even though I've set it to 'Name'?

David

Jan Borsodi

Monday 25 August 2003 5:14:33 am

You need to modify the fetch you use in your user template, right now I guess it doesn't have a sort_by parameter set or it's set to use publish.

See for instance.
http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/fetch_function_examples

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

David Barker

Monday 25 August 2003 5:27:30 am

Hi,
Where do I edit the template? At the moment in my page template, I have {$module_result.content} to display everything. If I replace that with 'fetch', it will only display a list (and sometimes I want the actual article to be displayed), won't it?

David

Bjørn Kaarstein

Monday 25 August 2003 5:45:33 am

You'll have to create overrides to achieve this.

http://www.ez.no/developer/ez_publish_3/documentation/customization/custom_design/override_templates

Also, if you turn on debug, under [TemplateSettings] in site.ini, you'll see which template to override.

Regards Bjørn

David Barker

Monday 25 August 2003 7:31:21 am

OK, now I have a HUGE problem... I just changed one line of folder.tpl and the whole of my folders would not display.

So I copied the original folder.tpl and that fixed most of the problem (except I have the old folder display now but nm)... but none of the folders under 'products' display at all. Help!!

David

eZ debug

Timing: Jan 31 2025 01:21:44
Script start
Timing: Jan 31 2025 01:21:44
Module start 'content'
Timing: Jan 31 2025 01:21:44
Module end 'content'
Timing: Jan 31 2025 01:21:45
Script end

Main resources:

Total runtime0.2438 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.9453370.2969
Module start 'content' 0.00590.0134 958.24221,005.5156
Module end 'content' 0.01940.2244 1,963.75783,894.4688
Script end 0.2438  5,858.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00421.7095200.0002
Check MTime0.00130.5255200.0001
Mysql Total
Database connection0.00070.283310.0007
Mysqli_queries0.156264.04671410.0011
Looping result0.00140.56561390.0000
Template Total0.224091.910.2240
Template load0.00080.337110.0008
Template processing0.223291.518610.2232
Override
Cache load0.00060.230510.0006
Sytem overhead
Fetch class attribute can translate value0.00160.670910.0016
XML
Image XML parsing0.00030.112710.0003
General
dbfile0.00692.8277200.0003
String conversion0.00000.001730.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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