Share » Forums » Setup & design » How to make Demo find my own News?

How to make Demo find my own News?

How to make Demo find my own News?

Monday 21 April 2003 11:14:41 pm - 5 replies

Author Message

Sergiy Pushchin

Wednesday 23 April 2003 12:16:22 am

>news_list=fetch(content,list,hash(parent_node_id,16,limit,5,sort_by,array(published,false()),class_filter_type,include,class_filter_array,array(2)))}
Are you sure that 16 here is the node_id of Your news folder? It can be objectID.

Scot Wilcoxon

Thursday 24 April 2003 8:03:41 am

16 is in the "id" field of "News" in table ezcontentobject. That must be the object ID.

I think the node ID is 160, as table eznode_assignment has an ID of 160 in the "id" field of the row with "contentobject_id" of 16.

16 find nothing.
160 ... well, finds one thing with item.name="Root folder" and item.node_id=2. But only when I strip off all the parameters other than "parent_node_id,160".

I thought "parent_node_id,160" searched for items with 160 as the parent, not searching for the item which is the parent of node 160. (not that it's documented anyplace but examples)

Sergiy Pushchin

Thursday 24 April 2003 9:26:35 am

16 is node id from ezcontentobject_tree table, it is a node where your news object published. To know this number you can look to the url when you view News folder in admin interface (last number in url).

Scot Wilcoxon

Thursday 24 April 2003 2:58:40 pm

Ah, yes. Objectid 16 happens to be nodeid 17, with path_identification_string "news". Nothing retrieved, even by the simpler
news_list=fetch(content,list,hash(parent_node_id,17))}
{section name=News5 loop=$news_list}
{$News5:item.name}<br />
{$News5:item.node_id}<br />
{/section}

Scot Wilcoxon

Monday 12 May 2003 11:18:37 pm

Demo's code still can't find my News folder.
Is "News" supposed to be a folder?

The fetch() for items with parent of the News folder doesn't seem to produce anything which a {section} loop can process. Merely printing the variable with the results of the fetch() just says "Array", but I can't find an incantation to display the contents.

The News folder is being displayed by the {section name=Menu} code, which somehow finds it in a way which can be processed.

This is with a database which has no Demo data. I created the News folder from admin, but can't persuade the Demo code to look at its contents.

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

36 542 Users on board!

Forums menu