Hi,
Try to take a look at the training slides + training templates zip available here:
http://www.jahia.org/jahia/Jahia/devzone/doc/pid/371
Docs: http://www.jahia.org/download/documentation/jahiatemplates.pdf http://www.jahia.org/jahia/webdav/shared/documentation/templates.zip
absoluteContainerList and relativeContainerList info should do the trick...
/SC
At 14:12 29/10/2004, you wrote:
Hi,
I'm pretty new in jahia so please excuse me if my questions seem to be quite stupid :)
Question 1) I want the page A to access a field that is another page (page B for instance).
Page A and B have the same template:
- a field with a title
- another one with a short description
-a containerList with a container, and in this container, a page (the page B)
I want to access a field in the page B which is in the containerList:
I've tried the following:
--------------------------------------------------------------------- <table border=1 width=680> <tr> <!-- le menu de gauche --> <td> </td>
<!-- le contenu principal -->
<td width=80%>
<content:currentPagePath separator=' > ' maxchar='40' />
<p>
<!-- ==== Titre ==== -->
<content:declareField name='title' title='title' type='SmallText'/>
<content:textField name='title' defaultValue='' id='title'/>
<jahiaHtml:actionMenu name='title' namePostFix='' resourceBundle='jahiatemplates.Corporate_portal_templates' useFieldSet=''>
</jahiaHtml:actionMenu>
</p>
<p>
<!-- ==== Description ==== -->
<content:declareField name='description' title='description' type='BigText'/>
<content:bigTextField name='description' defaultValue='' id='description'/>
<jahiaHtml:actionMenu name='description' namePostFix='' resourceBundle='jahiatemplates.Corporate_portal_templates' useFieldSet=''>
</jahiaHtml:actionMenu>
</p>
<!-- ==== Liste des sous pages ==== -->
<content:declareContainerList name="rubriqueList" title="Liste rubrique">
<content:declareContainer>
<content:declareField name="laPage" title="La page" type="Page" />
</content:declareContainer>
</content:declareContainerList>
<content:containerList name="rubriqueList" id="rubriqueList">
<content:container id="rubrique">
<content:pageField valueId="laPage" name="laPage" >
<logic:notEmpty name="laPage">
<content:bigTextField name="description" pageId="11" /><br>
<a href="<bean:write name="laPage" property="url" />"><bean:write name="laPage" property="title" /></a><br>
</logic:notEmpty>
<jahiaHtml:actionMenu name='rubrique' namePostFix='' resourceBundle='jahiatemplates.Corporate_portal_templates' useFieldSet=''>
</jahiaHtml:actionMenu>
</content:pageField>
</content:container>
<jahiaHtml:actionMenu name='rubriqueList' namePostFix='' resourceBundle='jahiatemplates.Corporate_portal_templates' useFieldSet=''>
</jahiaHtml:actionMenu>
</content:containerList>
<!-- ==== Affichage de la liste ==== --> <table border=1> <tr> </tr> </table>
</td> </tr> </table> ---------------------------------------------------------------------
In the following block i want to access to the field "description" with this: <content:bigTextField name="description" pageId="11" />
<content:pageField valueId="laPage" name="laPage" >
<logic:notEmpty name="laPage">
<content:bigTextField name="description" pageId="11" /><br>
<a href="<bean:write name="laPage" property="url" />"><bean:write name="laPage" property="title" /></a><br>
</logic:notEmpty>
<jahiaHtml:actionMenu name='rubrique' namePostFix='' resourceBundle='jahiatemplates.Corporate_portal_templates' useFieldSet=''>
</jahiaHtml:actionMenu>
</content:pageField>
But the result in the display is "Null" whereas the page B exists (its ID is 11) and the field description has a value!!!
Question 2) in the Template Guide Draft, you use "jahiaLib" as TagLib. Why when i use:
<%@ taglib uri="contentLib" prefix="content" %>
it works, but when i try:
<%@ taglib uri="jahiaLib" prefix="jahia" %>
I have a exception (taglib not found ?)
Excuse me for the triviality of my questions :)
Guillaume.
