Share » Forums » Setup & design » Show just the content of a folder on...

Show just the content of a folder on a node_list toolbar?

Show just the content of a folder on a node_list toolbar?

Friday 08 December 2006 6:33:33 pm - 6 replies

Author Message

Jon Staines

Monday 11 December 2006 5:06:13 am

If the 'Folder Facilities' folder only contains the folders you want to see in the list, then just set the 'Item Source' to 'Folder Facilities', don't have anything for 'Show in subtree' (leave it as Browse), and set 'Fetch whole tree?' to Yes. This will just fetch everything in the first layer beneath the 'Item Source' limited and ordered by the 'Number of items' and 'Sort on attribute' values.

If you are just wanting the folder names displayed, then you will have to edit the template.

Miguel Quintana

Monday 11 December 2006 9:55:53 pm

Thanks for your reply Jon, That is what I expected...
But it shows nothing... if I turned on "Fetch whole tree?" show items two levels down... sorts and work as expected...
I am not using "overides templates" yet for this project... I am finishing up organizing contet structure...
when I hit this problem...

Jon Staines

Tuesday 12 December 2006 1:21:17 am

Two levels down? From the Folder Facilities? You will need 'Show whole tree' set to Yes. Can you give an example of what there is in the folders, and what you see. eg:

-root
  -Folder Facilities
    -folder child 1
      -article 1         <----Seeing this in toolbar
    -folder child 2
    -folder child 3
  -another folder

Miguel Quintana

Tuesday 12 December 2006 7:43:54 am

Thanks for reply.... Ok...
From you presentation...

-root
-Folder Facilities
-folder child 1
-article 1 <----Seeing this in toolbar
-folder child 2
-folder child 3
-another folder

1. WHEN FECTH TREE IS OFF
When the configuration of the toolbar component is:

Item source: Folder Facilities (99)
Title: Facilities
Show in subtree: Browse
Number of items: 5
Sort on attribute: published
Fetch whole tree?: No

The toolbar does not show any item... empty...
AT this toolbar
I would like to show in this case "folder child 1", "folder child 2" and "folder child 3"..

2. WHEN FETCH TREE IS ON
When the configuration of the toolbar component is:

Item source: Folder Facilities (99)
Title: Facilities
Show in subtree: Browse
Number of items: 5
Sort on attribute: published
Fetch whole tree?: Yes

The toolbar shows JUST "article 1"... still no folders...

Jon Staines

Tuesday 12 December 2006 8:18:50 am

OK, my mistake, you will need to make a template override. You need to override:

/toolbar/full/node_list.tpl

In the middle of this template you will see 2 fetch content lines. Change the

class_filter_type, exclude,

to

class_filter_type, include,

so that the node list only shows folders instead of showing everything except folders. Leave your toolbar settings as:

Item source: Folder Facilities (99)
Title: Facilities
Show in subtree: Browse
Number of items: 5
Sort on attribute: published
Fetch whole tree?: No

The 'Fetch whole tree' set to No will limit the fetch to only the level directly beneath Folder Facilities.

This will affect any toolbar node lists on the site, so if you want it to only happen on a certain node list you are going to have to change the default override.

Miguel Quintana

Tuesday 12 December 2006 9:04:27 am

Hello again.... Thanks for the help...
Overriding

</toolbar/full/node_list.tpl>

worked...

I will work a little bit more minutes on the override... because I do not want all node_lists to behave like this... just
some...

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu