This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » General » Hard coded hash/id/? in demo templates

Hard coded hash/id/? in demo templates

Hard coded hash/id/? in demo templates

Tuesday 15 April 2003 12:04:49 am - 4 replies

In trying to understand ez3, I've noticed quite wide use of hard coded hash/id/? data in templates, eg.

(this one I think is calculated from datastructure)

(a fragment from pagelayout_section_3.tpl)

Is this an indication that the templates, etc. are hard coded to the data structures?

eg to contentobject_id's or hashes of same?

Could you give an idea of the extent of this 'hard coding' in templates?

An explanation of these number would be very useful both to me and many other new users, I'm sure.

With many thanks,

Sol Millin
byron bay

Tuesday 15 April 2003 10:10:34 am

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.

Monday 21 April 2003 3:38:51 am

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...).

Tuesday 22 April 2003 7:36:36 am

Have a look in the ewiki under How to's for

3 XHT_Fetch Function

if you need some info on fetch.

Hope this helps.


Tuesday 22 April 2003 8:57:31 am

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!

36 542 Users on board!

Forums menu

Proudly Developed with from