The reason for hard-coded values are that the entire demo has a static setup with some dynamic elements here and there. Had this been a real project it would have been much better to choose those hard-coded values trough related objects and grouping objects.
This ofcourse means that the demo design will only work with the demo data installed.
So instead of finding the News items the way 'demo' does, with fetch(content,list,hash(parent_node_id,24,sort_by,array(array(priority)))), the News should be retrieved through a more general means?
Is there a way to find the folder with the name "News", then fetch its contents?
It is hard enough to find anything about fetch(), and I haven't found documentation for the "content" and "list" parameters, much less what can be done other than "list" and hash(...number...).
I already had the wiki fetch page in a browser window. Didn't help.
In this case, how does one find the contents of a "News" folder..
fetch(...,class_filter_by(1)) [I see "1" for Folder in DB table ezcontentclass, but don't know if that is relevant] to get list of folders, then use php code to search that list for "News" as the "name", and then fetch() that folder -- no, I don't know that folder's node_id nor whether it is within the undocumented fetch() results.
I also don't know what node_id to use for a search. I've been testing with the Demo code and can't get any fetch() result when aimed at my newly-created News folder (as mentioned in my query in the Setup & design forum). And that's just with a static reference, without trying this search step.
You must be logged in to post messages in this topic!