Forums / Setup & design / Show just the content of a folder on a node_list toolbar?

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

Author Message

Miguel Quintana

Friday 08 December 2006 6:33:33 pm

Hello...
I am using version 3.8.6...
I want to show a the list of folders in a folder on the righ toolbar...

I setup this parameters
On the node_list toobar...

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

This setup shows nothing.

If I setup the parameter Fetch whole tree to Yes?...
It show me Items on the subtree... but I just need the 3 folders on Folder Facilities (99)?...

thanks for any help....

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...