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

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