Visibility override

Author Message

Patryk Kala

Tuesday 22 August 2006 1:49:45 am

{fetch( 'content', 'list', hash( 'parent_node_id', 2,
                                'ignore_visibility', true() ) )}

where should I paste it ??

Softriva .com

Tuesday 22 August 2006 1:54:08 am

This is a template code. It is usually written in .tpl file. Then ez will parse it and convert it to an html code.

I hope that I am not missing your question. If I am, then my appology in advance.

OOzy

Patryk Kala

Tuesday 22 August 2006 1:58:38 am

Could you write it more specificly?

I pasted it to override/full/folder.tpl
and it does't work
after doing it, looking throu CLASS "folder" , "Array" is showing

What should I do?

Patryk Kala

Wednesday 23 August 2006 5:32:26 am

????????????????????????????????????????????

Kristof Coomans

Wednesday 23 August 2006 5:57:46 am

Dear Patryk

Please be patient. A reply only consisting of question marks does not add any value to the topic.

Thank you

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Claudia Kosny

Wednesday 23 August 2006 10:28:34 am

Hello Patryk

Kristof is right, don't be so impatient. Also it would be helpful if you try to learn a bit about the template language yourself. Fetch functions are one of the basic functions which you will find in a lot of templates. Just look how there are used there and play around with the code. This will you will learn much more.

Regarding your problem: As you cand read here:
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list
the fetch function for 'content' 'list' fetches an array of nodes. Therefore you see the word array when calling up the template. As you want to work with the array (namely iterate through it and display each node) you have to assign the return value to a variable, roughly like this:
{def $mynodearray=fetch...

An example for that you can find here:
http://ez.no/doc/ez_publish/technical_manual/3_8/templates/information_extraction

Then you can go through the variable e.g. by using foreach which gives you access to each item in the array.

Claudia

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 18 2025 22:15:05
Script start
Timing: Jan 18 2025 22:15:05
Module start 'layout'
Timing: Jan 18 2025 22:15:05
Module start 'content'
Timing: Jan 18 2025 22:15:05
Module end 'content'
Timing: Jan 18 2025 22:15:05
Script end

Main resources:

Total runtime0.0132 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0041 589.0469152.6250
Module start 'layout' 0.00410.0025 741.671939.4453
Module start 'content' 0.00660.0048 781.117293.4609
Module end 'content' 0.01140.0017 874.578134.3047
Script end 0.0131  908.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002115.5678140.0001
Check MTime0.00097.0113140.0001
Mysql Total
Database connection0.00064.257410.0006
Mysqli_queries0.002418.410330.0008
Looping result0.00000.068810.0000
Template Total0.001511.110.0015
Template load0.00085.987210.0008
Template processing0.00075.039110.0007
Override
Cache load0.00064.181410.0006
General
dbfile0.001310.025780.0002
String conversion0.00000.038040.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