Forums / Install & configuration / Visibility override

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