Share » Forums » General » What is the deal with Object Relations?

What is the deal with Object Relations?

What is the deal with Object Relations?

Wednesday 02 February 2005 5:55:45 am - 4 replies

Author Message

Frederik Holljen

Wednesday 02 February 2005 5:57:47 am

An object relation is an abstract relation to another object. In your template you can access this relation (and the related object) and choose to display it in whatever way you like (e.g a link, an image, the complete object etc.)

Clemens T

Wednesday 02 February 2005 6:22:46 am

That sounds like a good programming technique! Could you point me to a few tutorials on how to handle these Object Relations in a template -- or just explain it to me briefly, please?
Thank you!
Clemens

Frederik Holljen

Wednesday 02 February 2005 6:31:24 am

You access it similarly to any other attribute of your content objects (using data_map.name_of_your_relation_attribute). You can use {$var_name|attribute(show)} on it to see what it contains.
Usually you either display the contents of the related object directly using your own HTML markup or you use one of the GUI functions like attribute_view_gui or content_view_gui.

Clemens T

Wednesday 02 February 2005 2:30:23 pm

Ok, thanks. Now the next question:

How can I override the template, because the folder structure doesn't make much sense to me -- I can't get it to work by placing a file in the /override/ dir. That's all you have to do right? Could you illustrate the usage of /override/ with one tmpl?

Great!

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

36 542 Users on board!

Forums menu