[opencms-dev] how to call a content file from a page ?

CALI-GARSIA Bruno bruno.cali-garsia-renexter at renault.com
Fri Jan 11 14:15:48 CET 2002


Hello,

I'm working on selecting dynamic content in a page: here is my problem :

I have 2 identical structures of folders:
folder1
  foldera
    page1 (<process> image </process>)
    image1
folder2
  folderb
    page2  (<process> image </process>)
    image2

The presentation of the page1 and page2 are strictly identical, except for
the images and texts
I wish, maybe is there another possibility (?), to put the definition of the
dynamic content(text and images) in one file at the level of the page:

ContentDefinition1.xml
<text> <![CDATA[ my text 1 ]]></text>
<image><![CDATA[/images/myimage1.gif]]></image>

ContentDefinition2.xml
<text> <![CDATA[ my text 2 ]]></text>
<image><![CDATA[/images/myimage2.gif]]></image>

My question is : where and how can I call theses file ?
I can't call it from the body of my page (because body pages can't call or
define any contenttemplate, element or element tag(??))
I can't call it from my elements because they are common to several pages
I can't call it from the frametemplate because the presentation of the
elements (or contenttemplates) is also common
I can't call it neither from the mastertemplate because I should write one
master template for every pages (800 pages !)

Any idea on how to do it ? Should I write my own class which get the
navigation context and put the good image and text ?
Please, help !

Greetings
Bruno




More information about the opencms-dev mailing list