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

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

eZ debug

Timing: Jan 31 2025 01:18:15
Script start
Timing: Jan 31 2025 01:18:15
Module start 'layout'
Timing: Jan 31 2025 01:18:15
Module start 'content'
Timing: Jan 31 2025 01:18:15
Module end 'content'
Timing: Jan 31 2025 01:18:15
Script end

Main resources:

Total runtime0.0233 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 588.3906151.2422
Module start 'layout' 0.00440.0034 739.6328220.7500
Module start 'content' 0.00780.0140 960.38281,005.9922
Module end 'content' 0.02180.0014 1,966.375037.9922
Script end 0.0232  2,004.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002510.7023140.0002
Check MTime0.00114.7194140.0001
Mysql Total
Database connection0.00062.765710.0006
Mysqli_queries0.00218.869530.0007
Looping result0.00000.047110.0000
Template Total0.00114.510.0011
Template load0.00093.736410.0009
Template processing0.00020.764910.0002
Override
Cache load0.00062.611110.0006
General
dbfile0.002611.101780.0003
String conversion0.00000.030740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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