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.