Re: How to make link to new page without container
Philippe Vollenweider <[email protected]> Fri, 08 Jun 2007 09:53:05 +0200
| Newsgroups | gmane.comp.cms.jahia.template |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
By the way you should not use a field which is
not in a container list because lucen won't index the content of this field.
You should better use a containerList of type
SINGLE_MANDATORY_TYPE. It should look like this:
<content:declareContainerList name="testContainerList" title="Titre"
containerListType="<%=JahiaContainerDefinition.SINGLE_MANDATORY_TYPE%>">
<content:declareContainer>
<content:declareField name='link' title='Link' type='Page'/>
</content:declareContainer>
</content:declareContainerList>
<content:containerList name="testContainerList" id="testContainerList">
<content:container id="testContainer">
<content:pageField valueId="link" name='link'>
<logic:notEmpty name="link">
<a href="<bean:write name='link' property='url'/>">
<bean:write name='link' property='title'/>
</a>
</logic:notEmpty>
</content:pageField>
<jahiaHtml:actionMenu name="testContainer" namePostFix=""
useFieldSet="false"
resourceBundle="jahiatemplates.Corporate_portal_templates"/>
</content:container>
</content:containerList>
Cheers,
Philippe
At 07.06.2007 23:40, you wrote:
>Hi David,
>
>your code contains some cosmetic errors that
>prevent it from working properly (note, please,
>the proper usage of 'valueId' and 'id' attributes).
>The code should be as follows:
>
><content:declareField name="menuTopLink1"
>type="Page" value="<jahia_linkonly>"/>
>
><content:pageField name="menuTopLink1"
>id="menuTopLink1" valueId="menuTopLink1Value"/>
>
><logic:notEmpty name="menuTopLink1Value">
> <a href='<bean:write
> name="menuTopLink1Value"
> property="url"/>'><bean:write name="menuTopLink1Value" property="title" /></a>
></logic:notEmpty>
>
><jahiaHtml:actionMenu name="menuTopLink1"
>namePostFix="" useFieldSet="false"
>resourceBundle="jahiatemplates.Corporate_portal_templates_v2"/>
>
>Kind regards
>Sergiy Shyrkov
>
>
>David Kováø schrieb:
>>
>>Hi,
>>creating pageField in container is documented very well. But what can I do
>>if I need to make exactly only one (in comparation with many links in
>>container) link in my template. I tried it like this:
>>
>><content:declareField name="menuTopLink1" type="Page"
>>value="<jahia_linkonly>"></content:declareField>
>>
>><content:pageField valueId="menuTopLink1"
>>name="menuTopLink1"></content:pageField>
>><logic:notEmpty name="menuTopLink1">
>> <a href='<bean:write name="menuTopLink1" property="url"
>>/>'><bean:write name="menuTopLink1" property="title" /></a>
>></logic:notEmpty>
>>
>>But the menuTopLink1 is still null and
>>
>><jahiaHtml:actionMenu name="menuTopLink1" namePostFix=".link.ostrava"
>>useFieldSet="false" />
>>
>>throuws error:
>>
>>ActionMenuTag, ERROR, org.jahia.taglibs.html.actions.ActionMenuTag: Couldn't
>>find any object with name menuTopLink1
>>
>>Can anybody tell me how to resolve this problem?
>>
>>Thanks in advance.
>>
>>David Kovar
>>
>>
>>
>>
>>
>>
>>_______________________________________________
>>template_list mailing list
>><mailto:[email protected]>[email protected]
>>http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list
>>
>_______________________________________________
>template_list mailing list
>[email protected]
>http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list
-------=[ pvollenweider at jahia dot com ]=---------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company
_______________________________________________
template_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/template_list