eZ Community » Forums » Developer » News_Folder for Parent_Node
expandshrink

News_Folder for Parent_Node

News_Folder for Parent_Node

Friday 04 May 2012 10:34:53 am - 9 replies

Hello everyone,

I have three columns of news in my home page,

but the Home Page and the News_Folder are exactly under the same node.

I mean i have my home page and i have fetched all the other elements inside of my home page.

then menu of the site is under my home page.

within my News_Folder i have the specific kind of news.

inside my News_Folder, When i have :

 {foreach fetch_alias( 'children', hash( 'parent_node_id', $node.parent_node_id,
                                                            'offset', $view_parameters.offset,
                                                            'sort_by', $node.sort_array,
                                                            'class_filter_type', 'exclude',
                                                            'class_filter_array', $classes,
                                                            'limit', $page_limit ) ) as $child }
                        {node_view_gui view='line' content_node=$child}
                    {/foreach}

i have all the sub-menus of the first node.

Can anybody help me,how can i specify the News_Folder_id for my parent_node_id , in the way that i can use it three times for my three columns?

Friday 04 May 2012 2:09:45 pm

HI,

 

I don't understand your content tree.

You should have :

 Home
- News list
-- News 1
-- News 2

And in your News List tpl, I would write :

 ( 'children', hash( 'parent_node_id', $node.node_id,
                                                            'offset', $view_parameters.offset,
                                                            'sort_by', $node.sort_array,
                                                            'class_filter_type', 'include',
                                                           'class_filter_array',array('news'),
                                                          'limit', $page_limit ) ) as $child }

Friday 04 May 2012 2:39:26 pm

Hi

No it's like this:

 

First page

-Home

-News Folder
--news1
--news2


- News folder2
--news1
--news2 



that's why i cannot use $node.node_id

Friday 04 May 2012 3:28:01 pm

Hi, what do you mean by:

 

i have all the sub-menus of the first node.

which node is  'first node'?

Modified on Friday 04 May 2012 3:29:35 pm by Ousmane KANTE

Friday 04 May 2012 4:27:39 pm

first node = node_id = 2

i have created my home page under this node , exactly like what i have here:

1.First page(node_id=2)   


2.-Home   


2.-News Folder          

3.--news1          
3.--news2   


2.- News folder2         

3.--news1         
3.--news2 

Modified on Friday 04 May 2012 4:28:35 pm by ray lab

Friday 04 May 2012 5:02:06 pm

Ok,

and you would like to fetch:

- News Folder/news1

- News Folder/news2

- News Folder2/news1

- News Folder2/news2

 

is it? or only those under 'News Folder' only?

Friday 04 May 2012 5:59:25 pm

Yes exactly i want to fetch the news which are inside of News Folder

i want my News Folder to be the " Parent " , to be able to load the news:

 

 {foreach fetch_alias( 'children', hash( 'parent_node_id', ???,
                                                            'offset', $view_parameters.offset,
                                                            'sort_by', $node.sort_array,
                                                            'class_filter_type', 'exclude',
                                                            'class_filter_array', $classes,
                                                            'limit', $page_limit ) ) as $child }
                        {node_view_gui view='line' content_node=$child}
                    {/foreach}

Wednesday 09 May 2012 2:40:38 pm

Nobody has any idea?

Wednesday 09 May 2012 2:51:17 pm

First of all, your homepage should be node 2.

Try to fetch your News Folder (specific class) to the this node. Then, fetch news under this node.

Wednesday 09 May 2012 3:17:45 pm

Thank you very much for ur answer Nicolas,

I changed the Node id of my custom  front page with my "Home" which contains all the website elements.

Is this correct?

1.Front Page(node_id=2)   

 2.-Folder -this Folder contains the site elements-(node_id=220)   

 2.-News Folder        
   3.--news1          
   3.--news2   

 2.- News folder2      
   
   3.--news1         
   3.--news2 

Modified on Wednesday 09 May 2012 3:23:04 pm by ray lab

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from