content


Provides a tag library for manipulating Jahia containers and fields (doc version 0.2 - 10/11/2008)

Tag Library Information
Display NameNone
Version1.0
Short Namecontent
URINone
 

Tag Summary
messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

Similar in functionality to content:resourceBundle.

Example 1 :

<logic:present name="engineMessages">
<div id="errors">
  <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
  <ul>
  <logic:iterate name="engineMessages" property="messages" id="curMessage">
    <li><content:message name="curMessage"/></li>
  </logic:iterate>
  </ul>
</div>
</logic:present>

The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

Example 2 :

<content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

ctnListSQueryInputNameGenerate the name for the container list search's query input form.

The ctnListSQueryInputName Tag automatically generates the correct Search option input name according to the enclosing container list. This allows the external search engine (e.g. Lucene) to know which container list to search.

The name is the combination of :

JahiaSearchConstant.CLIST_SEARCHQUERY_INPUT_PREFIX + containerlist name, which is currently equivalent to "clistsquery_" + containerlist name .

This tag is typically used in conjunction with content:ctnListSQueryInputValue.

Example :

...
  <content:jahiaPageForm name="jahiapageform">
  <content:containerList name="directoryPeopleContainer" title="People container" windowSize="5">
     <content:cListPaginationCurrentPageScrollingValue valueOnly="false" />
  <table border="0">
  <tr>
     <td valign="top" align="left"><b>  Search : </b></td>
     <td valign="top" align="left">
       <input type="text" name="<content:ctnListSQueryInputName/>" value='<content:ctnListSQueryInputValue/>' size="30">  <a href="javascript:document.jahiapageform.submit()">Go</a>
     </td>
  </tr>
  <tr>
     <td valign="top" align="left"><b>  Filter by : </b></td>
     <td>
        <select name="directoryPeopleType_filter" onChange="javascript:document.jahiapageform.submit()">
          <option value="All Types" <% if (selType.equals("All Types")){%>selected<% }%>>All Types
          <option value="Employee" <% if (selType.equals("Employee")){%>selected<% }%>>Employee
          <option value="Consultant" <% if (selType.equals("Consultant")){%>selected<% }%>>Consultant
        </select>
  ...
  <input type="hidden" name="directoryPeopleContainer_sort" value="<%=peopleSort%>">
  <input type="hidden" name="directoryPeopleContainer_sort_order" value="<%=peopleSortOrder%>">
  </content:containerList>
  </content:jahiaPageForm>
  ...

tabButtonDeclare a new Tab-like graphical button.

Must be enclosed inside <content:tabButtonsList> tag.

messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

Similar in functionality to content:resourceBundle.

Example 1 :

<logic:present name="engineMessages">
<div id="errors">
  <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
  <ul>
  <logic:iterate name="engineMessages" property="messages" id="curMessage">
    <li><content:message name="curMessage"/></li>
  </logic:iterate>
  </ul>
</div>
</logic:present>

The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

Example 2 :

<content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

containerCounterReturns the position of the enclosing container tag in a container list. Can be useful to generate anchor tags.

logRolloverdraws the button (full link) to allow login or logout operations with added support for rollover-enabled buttons.

Basically a <content:logButton> tag with added support for rollover-enabled buttons. One simply has to give it the names of the pictures used to build the buttons in each state. These names are declared in attributes in the following format :

  • an attribute whose name ends with On refers to the image displayed when the mouse is over its button.
  • an attribute ending with Off refers to the image displayed when the cursor is outside.

As this tag has two states (i.e. the same ‘log’ button is used when logged and not logged), it therefore has four attributes (two states and two images per state).

Example :

<content:logRollover loginOn="login_on.gif" loginOff="login_off.gif" logoutOn="logout_on.gif" logoutOff="logout_off.gif" />

containerAnchordraw an anchor displays an anchor on the given field of the enclosing container.

It generates <A NAME='field_XXXX'></A> where XXX is the field name specified in the attribute fieldName.

setUsrResourceBundlechange the default engine resourcebundle for a given user name.

It is used to allow template designers to change the default engine resource bundle used by engine popups opened from pages using this template on a per user basis. This therefore enables for different popups styles for given users.

This tag should be called on top of the template JSP file.

Please refer to the 'Engine Popup Customization' documentation for more details.

Example :

<content:setUsrEngineResourceBundle resourceBundle="albertResource" userName="albert" />

where albertResource is the name of Resource Bundle file for the user "albert" so that we get albertResource.properties .

cListPaginationPreviousRangeOfPagesDisplays a button (full link) to jump to the previous range of pagination window.

See content:cListPagination for more details.

cListPaginationPageUrlDisplays a button (full link) for the page number returned by the enclosing tag CListPaginationTag.getPageIndex().

Basically, this tag displays the current page number along with its link. It is executed as many times as there are pagination pages in the current pagination window.

See content:cListPagination for more details.

Example :

<content:cListPagination nbStepPerPage="3">
  <content:cListPaginationPreviousRangeOfPages method="post"
     formName="jahiapageform" title="&#160;..&#160;"/>
       ...
    
   <content:cListPaginationNextRangeOfPages method="post"
     formName="jahiapageform" title="&#160;..&#160;"/>
</content:cListPagination>

floatFielddisplays a Jahia float field.

Extends the AbstractFieldTag class.

Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
name, display, defaultValue, pageId, pageLevel, diffActive, valueId

adminButtondraws the button (full link) to access the Jahia administration page.

The button is only displayed if the requesting user has the appropriate rights: he is a member of the Admin group.

Example 1 :

<content:adminButton title='<%=getResourceBundle ("admin", "admin", jData)%>'/>

Example 2 :

<content:adminButton style="topbar" title="Administration Page"/>

pageFieldRetrieves a container field of type page to allow the enclosed tags to display page information such as title or Url.

Therefore this tag does not display anything; it's a declarative field only. The page attributes are accessed through the PageBean JavaBean-compliant class (instantiated by this tag) and Struts Bean tags. The following Bean attributes are subsequently available:

  • inCurrentPagePath : (Boolean) 'true' if the given page is not in the path of the current page, 'false' otherwise.
  • counter : (Integer) displays the number of hits on the current page field.
  • creator : (String) displays the user name of the creator of the current page field. The user name is the one used internally by Jahia.
  • id : (Integer) displays the unique identification number of the current page field.
  • title : (String) displays the title of the current page field.
  • type : (Integer) displays the type of the current page field. A TYPE_DIRECT (=0) page is a real page holding renderable content, while the TYPE_LINK (=1) and TYPE_URL (=2) are references on other pages. Respectively the TYPE_LINK and TYPE_URL type are links to an internal jahia page and a remote URL, which is usually a non jahia page. On a side note, TERMINATION_PAGE_ID (=-1) is the page tree hierarchy termination value - no real page should have this page ID!.
  • url : (String) displays the url of the current page field.
  • currentPage : (Boolean) 'true' if this page is the current page, 'false' otherwise.
  • aclID : (Integer) return the ACL unique identification number.
  • linkID : (Integer) return the internal jahia page ID in case the page is an internal jahia link.
  • dateOfCreation : (String) Return the page's date of creation in ms from 1975.
  • parentID : (Integer) Return the parent page unique identification number..
  • remoteURL : (String) Return the remote URL in case the page is an external reference (a non Jahia page. If the page is not an external URL, "<no url>" is returned..
  • completelyLocked : (Boolean) 'true' if this page cannot be changed, 'false' otherwise. Content objects are locked to prevent editing either if another user is currently already modifying the same object, or if the object or one of it's ancestors is in the "waiting for validation" workflow state.
  • partiallyLocked : (Boolean) same as above except that some operations are permitted.
  • homePage : (Boolean) 'true' if the page is the home page, 'false' otherwise.
  • level : (Integer) the number of the directory path levels from the homepage, with the homepage level being 1.
  • siteID : (Integer) returns the site ID.
  • templateID : (Integer) returns the ID of the template used for this page.
  • groupWorkFlowState : (Integer) [To Be Completed] .
  • independentWorkflow : (Boolean) [To Be Completed] .
  • Other Java Objects : Refer to PageBean.java for a complete list of all other accessible objects.

Example :


<content:declareContainerList name="linkContainer"
  title="linkContainer"
  titleKey="Link Container"
  bundleKey="<%=resBundleID%>"
>
  <content:declareContainer>
   <content:declareField name="link"
    title="Link"
    titleKey="link"
    bundleKey="<%=resBundleID%>"
    type="Page"
   />
  <content:declareField name="topImage"
   title="Section image"
   titleKey="topImage"
   bundleKey="<%=resBundleID%>"
   type="File"
  />
  </content:declareContainer>
</content:declareContainerList>

...
<content:pageField valueId="link" name="link">
  <logic:notEmpty name="link">
   Related link :
  <a
   <logic:equal name="link" property="type" value="2">
    target="_new"
   </logic:equal>
   href="<bean:write name='link' property='url'/>"
    ><bean:write name="link" property="title" filter="false"/></a><br/>
   </logic:notEmpty>
</content:pageField>
...

sharedLangTextFieldInsert a Jahia field of type big text.

Extends the AbstractFieldTag class. Exactly the same as a Smalltext field, except that the value of the field is shared in all languages.

Example :

<content:sharedLangTextField valueId='myColorSet' name='colorSet' defaultValue='vert' display='false'/>

Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
name, display, defaultValue, pageId, pageLevel, diffActive, valueId

deleteContainerURLreturns the URL allowing to open the delete container popup window.

Example :

<content:updateContainerURL id="updatelinkNewsListContainerURL" display="false"/>
<content:deleteContainerURL id="deletelinkNewsListContainerURL" display="false"/>
<logic:present name="updatelinkNewsListContainerURL">
   <a href="<bean:write name='updatelinkNewsListContainerURL'/>"><%=updateButton%></a>
   <a href="<bean:write name='deletelinkNewsListContainerURL'/>"><%=deleteButton%></a>
</logic:present>

Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
id, name, display, withJSPopup

relativeContainerListinitializes Jahia in order to display a container list referenced using absolute addressing and declares it if required.

This class extends the ContainerListTag class, it therefore inherits all its attributes. The reader should refer to containerList tag's documentation for more details.

The term “relative” is a little bit misleading, it does not mean that we are retrieving a special kind of container list, but rather that we access a container list on another page. With the containerList tag, only the current page container lists may be retrieved, but relativeContainerListTag allows us to retrieve a container list on another page, using relative addressing of a container list. So we pass an the 'levelNb' attribute that specifies how many page levels up from the current page is located the container we are seeking.

Example:

<content:relativeContainerList name=”addressList” levelNb=”1”>
    <!-- tags to display container list here -->
</content:relativeContainerList>

 

textFieldDisplays a Jahia text field.

Extends the AbstractFieldTag class. The most simple, and probably most useful, type of field. It may contain up to 255 characters.

Note the 255 character limit actually depends on the encoding used, and the way the database back-end stores the encoding. Some databases will treat this limit as a byte limit instead of a character limit, such as is the case for Oracle, limiting the length of input to a lower value.

Example :

<content:textField name='female' valueId='relation' diffActive='true' defaultValue='Not up for it' />

Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
name, display, defaultValue, pageId, pageLevel, diffActive, valueId

fileFieldNo Description
formContentMapperHandlerProcesses a submitted form and maps the parameters to fields in a container and adds the container to the specified container list.

In the example below, the formContentMapperHandler tag defines the mapping between the submitToTestContainerList form and its associated container list testContainerList. The attribute 'submitMarker' specifies which form on the page to link to and 'listName' the associated container list. Its value can be set to any <input> tag of the form with a unique name (to the page) such as submitToTestContainerList in this case. If the 'submitMarker' attribute is undefined, the form will not be processed.

Given the fields in the submitToTestContainerList form, the formContentMapperHandler tag expects to find the fields named title, content and bookformat in the container list testContainerList on the current page. If this isn't the case, an error is generated.

Example :

...
 <content:declareContainerList name="testContainerList" title="Content Container list">
   <content:declareContainer>
     <content:declareField name="title" title="Title" type="SmallText" value="Lord of the Flies"/>
     <content:declareField name="bookformat" title="BookFormat" type="SharedSmallText" />
     <content:declareField name="content" title="Content" type="BigText" />
   </content:declareContainer>
  </content:declareContainerList>
  <%
  ...
  String bypassUrl = jParams.composePageUrl(jData.page().getID());
  ...
  %>
 </head>
 <body>
...

 <h1>Add container with form</h1>

 <content:containerList name="testContainerList" id="testContainerList">

  <content:container id="testContainer">
   <h2><content:textField name="title" defaultValue=""/>
 <content:textField name="bookformat" defaultValue=""/></h2>
   <content:bigTextField name="content" defaultValue=""/>
   <br/>
  </content:container>

  <hr/>
 
 </content:containerList>

 <content:formContentMapperHandler listName="testContainerList" submitMarker="submitToTestContainerList" />
 <form action="<%=bypassUrl%>" name="submitToContainerList" method="post">
  <input type="text" name="title" value="Lord of the Flies"/><br/>
  <input type="text" name="bookformat"/><br/>
<textarea name="content"></textarea><br/>
<input type="submit" name="submitToTestContainerList" value="Submit"/>
 </form>
...

messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

Similar in functionality to content:resourceBundle.

Example 1 :

<logic:present name="engineMessages">
<div id="errors">
  <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
  <ul>
  <logic:iterate name="engineMessages" property="messages" id="curMessage">
    <li><content:message name="curMessage"/></li>
  </logic:iterate>
  </ul>
</div>
</logic:present>

The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

Example 2 :

<content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

containerDiffHighlightDisplays difference between the staging and live version of a container.

A container can be in any one of the following six possible states: Deleted, To be removed, To be restored, Updated, Added, Unchanged. The state is displayed to the user by prefixing the enclosed content with a state qualifier enclosed in a HTML <fieldset>tag. The style of the latter can be changed by editing the JahiaEnginesResources.properties, a snippet of which is given below:

JahiaEnginesResources.properties
org.jahia.services.version.restore.status.-1 = Deleted
org.jahia.services.version.restore.status.0 = To be removed
org.jahia.services.version.restore.status.1 = To be restored
org.jahia.services.version.restore.status.2 = Updated
org.jahia.services.version.restore.status.3 = Added
org.jahia.services.version.restore.status.4 = Unchanged
org.jahia.services.version.difference.style.-1 = border-color:black;
org.jahia.services.version.difference.style.0 = border-color:red;
org.jahia.services.version.difference.style.1 = border-color:red;border-style:dashed;border-top:dashed;
org.jahia.services.version.difference.style.2 = border-color:lime;
org.jahia.services.version.difference.style.3 = border-color:aqua;
org.jahia.services.version.difference.style.4 = border-color:grey;

By default, this tag will display the status of the container in which it's enclosed. You can change that behaviour by specifying any other qualified container in containerDiffHighlight's 'name' attribute.

Important: You must remember to close the HTML <fieldset>, introduced by this tag, with its matching </fieldset> tag. The example below details the steps required.

Notation Example 1 :

<content:containerList name='<%="contentContainer" + id%>' id="contentContainerList"> <tr><td><table width="100%" border="0">
    <content:container id="contentContainer"> <tr><td>
        <jahiaHtml:actionMenu name="contentContainer" namePostFix="" resourceBundle="jahiatemplates.Corporate_portal_templates">
                <content:containerDiffHighlight id="contentContainerHighLight" name="contentContainer"/>
                <content:textField name='<%="subTitle" + id%>' defaultValue="" diffActive="true" display="false" valueId="subTitle"/>
                <logic:notEmpty name="subTitle">
                    <h3><content:textField name='<%="subTitle" + id%>' defaultValue="" diffActive="true"/></h3>
                </logic:notEmpty> <div class="justify">
                <logic:present name="contentContainer" property='<%="field(picture" + id + ")"%>'>
                    <bean:define id="picture" name="contentContainer" property='<%="field(picture" + id + ").object"%>'/>
                    <logic:present name="picture">
                        <logic:equal name="picture" property="image" value="true">
                            <content:textField name='<%="align" + id%>' display="false" id="align" defaultValue=""/>
                            <img src="<bean:write name='picture' property='downloadUrl'/>" border="0" alt="<bean:write name='picture' property='fileFieldTitle' filter='false'/>"
                            <logic:present name="align">
                                align="<bean:write name="align"/>
                            </logic:present>"/>
                        </logic:equal>
                    </logic:present>
                 </logic:present>
                <content:bigTextField name='<%="mainContent" + id%>' defaultValue="" diffActive="true"/> </div> <br/>
                <logic:present name="contentContainerHighLight">
                </fieldset>
                </logic:present>


        </jahiaHtml:actionMenu></td></tr>
    </content:container></td></tr></table>
</content:containerList>

Typical Output Example 2 :

Compare Example 

Diff Status : Updated

My Dog

 

Hello everybody,

As everybody in the company knows, I am a big fan of dogs. My Dog Winnie is now 7 year old and is the best friend I ever had (excepted my familiy, of course!).

If you have a similar passion for dogs, please write to me an email and let's have a diner together....

I am a nice person.

John


 
Diff Status : Unchanged

Jess

I am married with Jess and we have one child. Please take a look at one of our family pictures below.

 
workflowButtonDisplays a button (full link) to open the Jahia content object workflow settings dialog.

The button is only displayed if the requesting user has the appropriate rights: he has write access to this page or he is a member of the Admin group.

Example :

<content:workflowButton style="topbar" title="Workflow"/>

setGrpEngineResourceBundlechange the default engine resourcebundle for a given user group.

It is used to allow template designers to change the default engine resource bundle used by engine popups opened from pages using this template on a per group basis. This therefore enables for different popups styles for given groups of users.

This tag should be called on top of the template JSP file.

Please refer to the 'Engine Popup Customization' documentation for more details.

Example :

<content:setGrpEngineResourceBundle resourceBundle="employeesResource" groupName="employees" />

where employeesResource is the name of Resource Bundle file for the group "employees" so that we get employeesResource.properties .

contextURLReturns the URL of the current JSP template directory.

Corresponds to following Java code: request.getRequestURI().substring(0,request.getRequestURI().lastIndexOf("/"))

Example 1 :

<img src="<content:contextURL/>/images/update.gif" border="0" alt="Update">

Example 2 :

<link href="<content:contextURL/>/css/windowStates.css" rel="stylesheet" type="text/css"/>

ctnListSQueryInputValueGenerate the value for the container list search's query input form

The ctnListSQueryInputName Tag automatically is used to populate the input value with the previous Search query entered by the user. This allows the external search engine (e.g. Lucene) to know the search query.

The name is the combination of :

JahiaSearchConstant.CLIST_SEARCHQUERY_INPUT_PREFIX + containerlist name, which is currently "clistsquery_" + containerlist name

This tag is typically used in conjunction with content:ctnListSQueryInputValue.

Example : Refer to content:ctnListSQueryInputValue

cListPaginationFirstItemIndexReturn the index of the first listed item ( container ) in the current displayed page ( container list pagination ).

This tag only needs to be enclosed inside the containerList Tag. It is part of the 3 tags (content:cListPaginationTotalSize and content:cListPaginationLastItemIndex) used to give some information about the navigation through the paginated Container List.

See content:cListPagination for more details.

messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

Similar in functionality to content:resourceBundle.

Example 1 :

<logic:present name="engineMessages">
<div id="errors">
  <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
  <ul>
  <logic:iterate name="engineMessages" property="messages" id="curMessage">
    <li><content:message name="curMessage"/></li>
  </logic:iterate>
  </ul>
</div>
</logic:present>

The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

Example 2 :

<content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

drawTabButtonsRenders a list of tab-like buttons.

Must be enclosed inside a <content:tabButtonsList> tag.

The reason why the functionality of the drawTabButtons tag is not included in the tabButtonsList tag is to enable third parties to develop their own customized Tab-rendering tag by simply modifying the existing DrawTabButtonsTag.java class.

messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

Similar in functionality to content:resourceBundle.

Example 1 :

<logic:present name="engineMessages">
<div id="errors">
  <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
  <ul>
  <logic:iterate name="engineMessages" property="messages" id="curMessage">
    <li><content:message name="curMessage"/></li>
  </logic:iterate>
  </ul>
</div>
</logic:present>

The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

Example 2 :

<content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

displayLanguageFlagDisplay a country flag image (if possible) corresponding to a given language.

Synopsis : <content:displayLanguageFlag [code="<iso639&ht;[_<iso3166>]]"
     [href="<anchor href>"] [alt="<text>"]
     [resourceOn="<relative path to an image>"]
     [resourceOff="<relative path to an image>"] />


The language is a composition of these both paramters :

  • 'iso639' : is the iso 639 language code. If this code is incorrect then the code name is displayed as is.
  • 'iso3166' : Optional parameter that represent the iso 3166 country code.

    examples :    code="en_UK" ; will display : English
       code="fr" ; will display : fran�ais
       code="fr_CH" ; will display : fran�ais
       code="ar_AS" ; will display : العربية (arabic chars)

    Example :

    <content:displayLanguageFlag code="<%=languageCode%>"
       href="<%=currentLanguageCode.equals(languageCode) ? "" : jData.gui().drawPageLanguageSwitch(languageCode)%>"
       alt="<%=languageName%>"/>

  • messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    updateContainerURLDisplays the URL that allows to update the fields of a container.

    Example :

    <content:updateContainerURL id="updatelinkNewsListContainerURL" display="false"/>
    <content:deleteContainerURL id="deletelinkNewsListContainerURL" display="false"/>
    <logic:present name="updatelinkNewsListContainerURL">
       <a href="<bean:write name='updatelinkNewsListContainerURL'/>"><%=updateButton%></a>
       <a href="<bean:write name='deletelinkNewsListContainerURL'/>"><%=deleteButton%></a>
    </logic:present>

    Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
    id, name, display, withJSPopup

    colorFielddisplays a Jahia color field.

    Extends the AbstractFieldTag class. This is basically a TextField with special behaviour properties in Edit mode: a colour picker is displayed instead of a text editor.

    An example colour value: "#FF00FF"

    Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
    name, display, defaultValue, pageId, pageLevel, diffActive, valueId

    containerListinitializes Jahia in order to display a container list; typically by looping through all containers in the container list.

    This tag is used to display all the contents contained in a containers list. The content enclosed within this tag is processed as many times as there are containers in the current container list.

    Note that container lists can be nested.

    Example 1:

    <content:containerList name="guestbookContainer" id="guestbookContainerList">
        <content:container id="guestbookContainer">
            <h2><content:textField name="title" /></h2>
            <content:textField name="name"/>
            <content:textField name="email"/>
        </content:container>
    </content:containerList>

    This example cycles through all the containers guestbookContainer in the container list guestbookContainerList and displays the title, the name and email for each entry in the guestbook.

    Example 2:

    <content:containerList name='mainContentContainerList' id="mainContentContainerList">
      <jahiaHtml:actionMenu name="mainContentContainerList" namePostFix="Text" resourceBundle="jahiatemplates.Corporate_portal_templates">
      </jahiaHtml:actionMenu>
    </content:containerList>

    With the above code, the action menu is displayed in Edit mode and enables one to add a container and to edit the container list's properties. Note that it will not display its contents, as we haven't yet included the tags that will display the containers and the fields within the container list.

    containerListPropertiesURLdisplays the URL of the container list properties window.

    Example :

    <content:containerListPropertiesURL id="containerListPropertiesURL" display="false" withJSPopup="false" />
    <logic:present name="containerListPropertiesURL">
       This should only appear in edit mode.
       <a href="<bean:write name='containerListPropertiesURL'/>">Container list properties</a>
    </logic:present>

    Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
    id, name, display, withJSPopup

    cListPaginationIterates through the list of paginated page numbers from the enclosing container list in the current range of pages.

    The cListPagination tag doesn't display anything by itself. It loops over itself for every paginated page and executes other enclosed pagination tags. It must be enclosed within a container list.

    Background: This tag is part of the Container List Pagination Tag set i.e. all content:cListPagination* tags. These tags facilitate displaying navigation widgets for paginated container lists, or what we refer to as Quick Page Access Buttons. These tags displays break up the a container list into a smaller sets (a.k.a. ranges/pagination windows) of pages. Below is an example generated menu :

    <<Previous results  1  2  3  Next results>>


    FYI here is its associated HTML code :

    <a href="javascript:changePage(document.jahiapageform,document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_0');"> \<\<Previous results</a>\ 
    <a href="javascript:changePage(document.jahiapageform,document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_0');"> 1</a>\  <b>
    <a href="javascript:changePage(document.jahiapageform,document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_5');"> 2</a>\  </b>
    <a href="javascript:changePage(document.jahiapageform,document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_10');"> 3</a>\ 
    <a href="javascript:changePage(document.jahiapageform,document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_10');"> Next results\>\></a> </p>

    Example :

    <content:jahiaPageForm name="jahiapageform">
    <content:containerList name="directoryProjectContainer" title="Project container" windowSize="5">
         <content:cListPaginationCurrentPageScrollingValue valueOnly="false" />

    <table border="0">
    <tr>
         <td align="left" valign="top"><b>  Search : </b></td>
         <td valign="top" align="left">
             <input type="text" name="<content:ctnListSQueryInputName/>" value="<content:ctnListSQueryInputValue/>" size="30"/>  <a href="javascript:document.jahiapageform.submit()">Go</a>
         </td>
    </tr>
    <tr>
         <td align="left" valign="top"><b>  Filter by : </b></td>
         <td>
             <select name="directoryProjectCategory_filter" onChange="javascript:document.jahiapageform.submit()">
                 <%
    Enumeration projectCategoriesEnum= projectCategoriesVector.elements();
                 while (projectCategoriesEnum.hasMoreElements()) {
    String myCat = (String) projectCategoriesEnum.nextElement();
                     %><option value="<%=myCat%>" <% if (selProjectCategory.equals(myCat)){%>selected<% }%>><%=myCat%></option><%
                 }
                 %>
             </select>
         </td>
    </tr>
    <tr>
         <td align="left" valign="top"><b>  Result : </b></td>
         <td width="100%" align="left" valign="top">
             <table border="0" cellpadding="0" cellspacing="0">
             <tr>
                 <td align="left" valign="top" nowrap>
                     <select class="text" name="directoryProjectContainer_windowsize" onChange="javascript:document.jahiapageform.submit()">
                     <option value="5" <% if (selProjectWindowSize.equals("5")){%>selected<% }%>>5</option>
                     <option value="10" <% if (selProjectWindowSize.equals("10")){%>selected<% }%>>10</option>
                     <option value="20" <% if (selProjectWindowSize.equals("20")){%>selected<% }%>>20</option>
                     </select> (Items/Page)   <font size="2">[<content:cListPaginationFirstItemIndex /> - <content:cListPaginationLastItemIndex />] of <content:cListPaginationTotalSize /></font>
                 </td>
                 <td align="right" valign="top" width="100%">
                
                     <content:previousWindowButton title="<<Prev" method="post" formName="jahiapageform" /> 
                
    <b> <content:cListPagination nbStepPerPage="10" > </b>
                
                     <content:cListPaginationPreviousRangeOfPages method="post" formName="jahiapageform" title=" .. "/>
                     <content:ifCListPaginationCurrentPage>
                     <b>
                     </content:ifCListPaginationCurrentPage>
                     <content:cListPaginationPageUrl method="post" formName="jahiapageform" /> 
                     <content:ifCListPaginationCurrentPage>
                     </b>
                     </content:ifCListPaginationCurrentPage>
                     <content:cListPaginationNextRangeOfPages method="post" formName="jahiapageform" title=" .. "/>
                    
                     </content:cListPagination>
                    
                     <content:nextWindowButton title="Next>>" method="post" formName="jahiapageform" />
                 </td>
             </tr>
             </table>
         </td>
    </tr>
    </table>

    <input type="hidden" name="directoryProjectContainer_sort" value="<%=projectSort%>"/>
    <input type="hidden" name="directoryProjectContainer_sort_order" value="<%=projectSortOrder%>"/>
    </content:containerList>
    </content:jahiaPageForm>

    jsPathreturns the path to the Javascript files

    See content:JSTools.

    nextWindowButtonDisplays a button (full link) for scrolling to the next window page of a scrollable container list.

    This tag is part of the Container List Pagination functionality that basically partitions a long list of containers, contained within a container list, into more manageable shorter lists displayed on a per page basis.

    Use the step parameter to specify how many pages to step (default 1) and the windowSize to change the default size specified in the template.

    Example 1 :

    <content:nextWindowButton title="Next\&gt;\&gt;" method="post" formName="jahiapageform" />

    The above Tag will generate the following URL:

    <a href="javascript:changePage(document.jahiapageform, document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_10');"> windowSize_windowStep Next>> </a>

    The javascript changePage method changes the form's ctnscroll_directoryPeopleContainer to '5_10' and submits the form.

    Example 2 :

    You want to use this Tag to generate a simple URL when not using forms (FYI we also include the containerlist tag) :


    <content:containerList name="contentList1" title="Content List" windowSize="5" >
       ...
       <content:nextWindowButton title="Next\>\>" />
       ...
    </content:containerList>

    The above Tag will generate the following URL:

    <a href="http://localhost:8080/jahia/Jahia/cache/offonce/pid/7/ctnscroll_directoryPeopleContainer/5_10">Next>></a>

    siteMapButtonDisplays a button (full link) for accessing the Jahia site map.

    Example :

    <content:siteMapButton style="path" title="Sitemap"/>

    updateFieldURLDisplays the URL to update a field.

    Example 1 :

    <content:textField name="pageTitle" />
    <content:updateFieldURL fieldName="pageTitle" display="false" id="updateFieldURL" withJSPopup="false" />
    <logic:present name="updateFieldURL">
          <a href="<bean:write name='updateFieldURL'/>">Update field</a>
    </logic:present>

    Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
    id, name, display, withJSPopup

    previousWindowButtonDisplays a button (full link) for scrolling to the previous window page of a scrollable container list.

    This tag is part of the Container List Pagination functionality that basically partitions a long list of containers, contained within a container list, into more manageable shorter lists displayed on a per page basis.

    Use the step parameter to specify how many pages to step (default 1) and the windowSize to change the default size specified in the template.

    Example 1 :

    <content:previousWindowButton title="&lt;&lt;Prev" method="post" formName="jahiapageform" />

    The above Tag will generate the following URL:

    <a href="javascript:changePage(document.jahiapageform, document.jahiapageform.ctnscroll_directoryPeopleContainer,'5_0');"> windowSize_windowStep &lt;&lt;Prev </a>

    The javascript changePage method changes the form's ctnscroll_directoryPeopleContainer to '5_10' and submits the form.

    Example 2 :

    You want use this Tag to generate a simple URL when not using forms (FYI we also include the containerlist tag) :


    <content:containerList name="contentList1" title="Content List" windowSize="5" >
       ...
       <content:previousWindowButton title="amp;lt;amp;lt;Prev" />
       ...
    </content:containerList>

    The above Tag will generate the following URL:

    <a href="http://localhost:8080/jahia/Jahia/cache/offonce/pid/7/ctnscroll_directoryPeopleContainer/5_0">amp;lt;amp;lt;Prev</a>

    undefinedFieldAbstract class for all field tags.

    Do not use this tag directly! It is included for reference purposes only since all its methods are inherited by all other field tags.

    bigTextFieldInsert a Jahia field of type big text.

    Extends the AbstractFieldTag class. A BigTextField is the same as a Smalltext field, except that the value is not stored in the database but on the file system, so that its length is be unlimited in size. It supports multi-lingual values.

    By default, an html editor is displayed when the user wants to make changes to this field. The configuration file WEB-INF\etc\htmleditors\htmleditors_config.xml determines the default html editor to use, as well as the presence and ranking of any other html editors.

    Example :

    <content:bigTextField name='inter' defaultValue='course' diffActive='true'/>

    Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
    name, display, defaultValue, pageId, pageLevel, diffActive, valueId

    adminResourceBundledisplay a specific value from Jahia Admin's ResourceBundle.

    This tag can be used to dynamically request a given resource from the admin resource bundle.

    See content:resourceBundle.

    If the requested resource bundle is missing and useDefault is true, Jahia will look for another resource bundle in that order :

    1. Look for the site's default admin resource bundle. Each site can have a default admin resource bundle. It's name must be of this form : "JahiaAdminResourcesMYJAHIASITE" where MYJAHIASITE is the virtual site's sitekey in uppercase.

    2. Finally if none of the previous resource bundles are available, Jahia will return the default resource bundle named "JahiaAdminResources".

    Example : <content:adminResourceBundle resourceName="org.jahia.admin.unknownErrorOccured.label"/>

    addContainerURLDisplays the URL that allows to add a container in a container list.

    Example 1 :

    <content:addContainerURL id="addContainerURL" display="false"/>

    Example 2 :

    <content:addContainerURL id="addContainerURL" display="false" withJSPopup="false" />

    Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
    id, name, display, withJSPopup

    adminRolloverdraws the button (full link) to access the Jahia administration page with added support for rollover-enabled buttons.

    Basically a <content:adminButton> tag with added support for rollover-enabled buttons. The button is only displayed if the requesting user has the appropriate rights: he is a member of the Admin group.

    One simply has to give it the names of the pictures used to build the button in each state. These names are declared in attributes in the following format :

    • an attribute whose name ends with On refers to the image displayed when the mouse is over its button.
    • an attribute ending with Off refers to the image displayed when the cursor is outside.

    Example :

    <content:adminRollover adminOn="admin_on.gif" adminOff="admin_off.gif" />

    containerListSizeReturn the number of containers of the enclosing container list.

    @deprecated already available in containerList tag through its 'size' attribute.

    declareContainerDeclares a container.

    Jahia allows fields to be grouped into a logical entity called a container. A container may include any number of fields, as well as sub container lists. Basically, it is just a holder for a list of sub fields and container lists. The grouping of fields in containers also defines the ordering (or ranking) of the fields. When the fields of a container are displayed, this ordering determines the order in which they are displayed. Containers are therefore a way to define structured grouping of fields, as well as being entries in container lists.

    Example:
    <content:declareContainerList name='leftMenuContainerList' title='Left Menu'>
      <content:declareContainer>
        <content:declareField name='leftLink' title='Left Link' type='Page'/>
      </content:declareContainer>
    </content:declareContainerList>

    This statement declares a container list that contains a container which itself includes a page field.

    applicationFieldInsert a web application.

    Extends the AbstractFieldTag class.

    Example :


    <p>
    My application :
    <br>
      <content:applicationField name="myApp" title="My Web Application" />
    </p>

    How simpler does it get!?

    Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
    name, display, defaultValue, pageId, pageLevel, diffActive, valueId

    setEngineResourceBundlechange the default engine resourcebundle.

    It is used to allow template designers to change the default engine resource bundle used by engine popups opened from pages using this template. This therefore enables for different popups styles. When resource bundle are set at Page Level, they have precedence over resource bundle set at Site Level.

    This tag should be called on top of the template JSP file.

    Please refer to the 'Engine Popup Customization' documentation for more details.

    Example :

    <content:setEngineResourceBundle resourceBundle="SubSiteResource" />

    where SubSiteResource is the name of your Resource Bundle file with 'SubSiteResource.properties'

    declareContainerListThis tag is used to declare a container list.

    A container list is simply a list of containers. It also defines an order, which by default is the order in which the containers where added to the container list. Container lists may only be composed of containers of a specific definition.

    Contrary to containers and fields, container lists do not have definition names, they are simply referred to using the container definition name, which is fine since a container list may only contain one type of container.

    This is why users must be careful in their naming conventions when creating content definitions, because you might be tempted to call your container definition 'addressList' instead of 'address', which is fine, but then you should make sure you also call all your other container definition something similar such as 'nameList', 'newsList', etc...

    Container lists cannot be created or deleted by end-users in Jahia, they are objects whose life cycle is automatically managed by Jahia. The system will automatically create the container list when the first container is created, and container lists are deleted once the parent object is deleted.

    The parent object of a container list is usually a Jahia page, but may also be a container. The possibility to embed a container list within a container is a powerful mechanism to create complex structures.

    Example:

    <content:declareContainerList name='mainContentContainerList' title='Main Content'>
    <content:declareContainer>
        <content:declareField name='title' title='Title' type='SmallText'/>
        <content:declareField name='content' title='Content' type='BigText'/>
        <content:declareField name='image' title='Image' type='File'/>
        <content:declareField name='align' title='Image align' type='SharedSmallText' value='<jahia_multivalue[left:right:default]>left'/>
        <content:declareField name='date' title='Date' type='Date' value='<jahia_calendar[dd mon yyyy / HH:MM]>'/>
    </content:declareContainer>
    </content:declareContainerList>

    siteMapRolloverDisplays a button (full link) for accessing the Jahia site map with added support for rollover-enabled buttons.

    Basically a <content:siteMapButton> tag with added support for rollover-enabled buttons. One simply has to give it the names of the pictures used to build the button in each state. These names are declared in attributes in the following format :

    • an attribute whose name ends with On refers to the image displayed when the mouse is over its button.
    • an attribute ending with Off refers to the image displayed when the cursor is outside.

    Example :

    <content:siteMapRollover siteOn="site_on.gif" siteOff="site_off.gif" height="10" width="15" imgdir="pics" previewOff="preview_off.gif" />

    switchModeButtondraws the button to switch between view, preview and edit mode.

    The button displays the appropriate caption depending if staging is active and the user's current viewing mode. This button is only displayed when the user is logged, or when the guest was set write access on the current page.

    dateFielddisplays a Jahia date field.

    Extends the AbstractFieldTag class.

    When a DateField is declared, it supports a date mask attribute. The date format uses the following syntax:

    • DD : the day with 2 digits
    • MM : the month with 2 digits
    • MONTH : the month in letter
    • MON : the first three letter of the month
    • YY : the year with 2 digits
    • YYYY : the year with 4 digits
    • HH:MM : the hour and minutes
    • TT : if present, the time is displayed in 12-hour format; if not in 24-hour format.

    Date format examples: DD.MM.YYYY, MM-DD-YY, or DD/MM/YY HH:MM. If there is no date format, the engine will use DD MONTH YYYY by default.

    Example :

    <content:declareField
       name='mynewsDate'
       title='News date'
       titleKey='newsDate'
       bundleKey='<%=resBundleID%>'
       type='Date'
       value='<jahia_calendar[dd mon yyyy]>'
    />

    <content:dateField name='mynewsDate' defaultValue='' diffActive='true'/>

    Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
    name, display, defaultValue, pageId, pageLevel, diffActive, valueId

    categoryRetrieves a category from the backend and gives access to the category, its children objects as well as its sub-tree.

    This tag can be used to display information about a specific category, or to build navigation trees for categories, or to display children of a specific category.

    Background : Categories allow users to classify any content object, making it possible to then browse them using a different hierarchy than the page navigation hierarchy.

    In order to browse a category, this usually involves looking at a specific root category and listing all the objects that are related to the category, such as sub-categories or other objects that are available in that category.

    An example of classification is a content book list that needs to categorize the books. In this case the content manager would either re-use or input a classification tree and then use it to classify the books. Users of the system can then browse using the categories to view books that are related to each other, or view books that are in the same categories as the currently viewed book.

    One of the main open questions is where to start category browsing. We might have different entry points depending on the type of objects we are looking for in the categories. For example a category entry point might be different if we are looking at web applications or content objects, and the same goes for templates, etc...

    Example 1 : Retrieving the root category

    First, we will show is how to retrieve the root category, which always exists :

    <content:category key="root" id="rootCategory" subTreeID="categoryTree" />

    The above tag is quite powerful. Basically what it does is :

    • retrieves the root category in the backend
    • stores the corresponding CategoryBean object under the \�rootCategory\� pageContext attribute
    • stores the subtree for the root category in the pageContext attribute categoryTree. The class type for the tree object is JTree, which may be used with the <jahiaHtml:tree> tag for displaying.

    Example 2 :

    <content:category key="<%=selectedCategory.getKey()%>" id="currentCategory" />

    Example 3 :

    <content:category key="root" id="rootCategory" subTreeID="categoryTree" />

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    booleanFieldDisplays a Jahia boolean field.

    Extends the AbstractFieldTag class.

    Example :

    <content:booleanField valueId='displayDropMenu' name='displayDropMenu' display='false' defaultValue='true'/>

    Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
    name, display, defaultValue, pageId, pageLevel, diffActive, valueId

    displayLanguageCodeDisplay a language in the country language format corresponding to a language code


    The language is a composition of these both paramters :

  • 'iso639' : is the iso 639 language code. If this code is incorrect then the code name is displayed as is.
  • 'iso3166' : Optional parameter that represent the iso 3166 country code.

    examples :
      code="en_UK" ; will display : English
      code="fr" ; will display : français
      code="fr_CH" ; will display : français
      code="ar_AS" ; will display : العربية (arabic chars)

    Example :

    <content:displayLanguageCode code="<%=jParams.getLocale().getLanguage()%>" href="<%=jData.gui().drawPageLanguageSwitch(languageCode)%>"/>

  • displayIconDisplays a non localized HTML image tag (i.e. <IMG>) defined in a common resource bundle file.

    Example :

    <content:displayIcon src="hugh" alt="Ardon" align="absmiddle" width="14" height="10" altBundle="mybundle" altKey="com.acme.hugh.label" />

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    ifCListPaginationCurrentPageEvaluate its body only if the current iteration of the enclosing cListPagination tag is for the currently display page.

    i.e. if the enclosing CListPaginationTag.isCurrentPage() returns true.

    When iterating through the Quick Page Access Buttons list, this Tag can be used to check if the current Quick Page Access Button to display refers to the currently Displayed page. If so, we can highlight this button using Bold characters, etc...

    See content:cListPagination for more details.

    Example :

    <content:cListPagination nbStepPerPage="3">
     <content:cListPaginationPreviousRangeOfPages method="post"
        formName="jahiapageform" title=" .. "/>

      <content:ifCListPaginationCurrentPage><b>
      </content:ifCListPaginationCurrentPage>
        <content:cListPaginationPageUrl method="post"
         formName="jahiapageform" /> 
      <content:ifCListPaginationCurrentPage></b>
      </content:ifCListPaginationCurrentPage>

     <content:cListPaginationNextRangeOfPages method="post"
        formName="jahiapageform" title=" .. "/>
      </content:cListPagination>

    resourceBundledisplay a specific value in a resource bundle.

    This tag can be used to dynamically request a given resource from the engine resource bundle.

    If locale is not set, the locale used is the one returned by paramBean.getLocale().

    Similar in functionality to content:message.

    Background : Resource bundles contain key/value pairs for specific locales and are used for internalization. Go here for more details.

    Note that Jahia finds the .properties file associated to a given bundle identifier by doing a lookup in resourcebundles_config.xml located in \WEB-IN\etc\config. The resourcebundles_config.xml file is generated automatically during template deployment. For example, given the the following resourcebundles_config.xml:


    <?xml version="1.0" encoding="UTF-8" ?>
     <registry>
           <resource-bundle>
               <key>myjahiasite_CORPORATE_PORTAL_TEMPLATES</key>
               <file>jahiatemplates.Corporate_portal_templates</file>
           </resource-bundle>
    </registry>

    Then given a bundle identifier of myjahiasite_CORPORATE_PORTAL_TEMPLATES, the key/value lookup will be in Corporate_portal_templates.properties (located in directory \WEB-INF\classes\jahiatemplates) for the default language; or for example in Corporate_portal_templates_de.propreties if the current user's locale is German.

    Example :

    <content:resourceBundle resourceBundle="jahiatemplates.acme_templates" resourceName="search"/>

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    cListPaginationLastItemIndexReturn the index of the first listed item ( container ) in the current displayed page ( container list pagination ).

    This tag only needs to be enclosed inside the containerList Tag. It is part of the 3 tags (content:cListPaginationTotalSize and content:cListPaginationFirstItemIndex) used to give some information about the navigation through the paginated Container List.

    See content:cListPagination for more details.

    logButtondraws the button (full link) to allow login or logout operations.

    The button displays the appropriate caption depending on the user's current login status.

    Example :

    <content:logButton    style="diamon"
       loginTitle='<%=getResourceBundle ("login", "login", jData)%>
       logoutTitle='<%=getResourceBundle ("logout", "logout", jData) + " " + user.getUsername()%>'/>

    <content:adminButton title='<%=getResourceBundle ("admin", "admin", jData)%>'/>

    serverHttpPathReturns the URL of the current context / server http path

    See content:ContextURL.

    Example 1 :

    <img src="<content:serverHttpPath />/jsp/jahia/engines/images/hr.gif" width="100%" height="2"/>

    Example 2 :

    <link rel="stylesheet" href="<content:serverHttpPath/><jahia:engineResourceBundle resourceName="org.jahia.stylesheet.css"/>" type="text/css">

    tabButtonsListinitializes Jahia in order to display a series of tab-like graphical buttons.

    This is an attribute-less tag which encloses a series of <content:tabButton> tags (which each declare a separate tab) followed by the <content:drawTabButtons> tag (which renders all the enclosed tabs). Therefore, the tabButtonsList tag is always used in conjunction with both aforementioned tags.
    For examples of tab button usage, please refer to the Jahia engines popups where they are extensively employed.

    Example 1 :


    <content:tabButtonsList>
         <content:tabButton label="userList" labelKey="org.jahia.engines.users.SelectUG_Engine.userList.label"
         <content:tabButton label="groupList" labelKey="org.jahia.engines.users.SelectUG_Engine.groupList.label"
         <content:drawTabButtons />
    </content:tabButtonsList>

    Example 2 :


    <content:tabButtonsList>
       <logic:iterate id="tabButton" name="jahiaEngineButtonsHelper" property="buttons" type="java.lang.String">
         <logic:equal name="tabButton" value="AUTHORING_BUTTON">
             <content:tabButton label="Authoring" labelKey="org.jahia.engines.include.actionSelector.Authoring.label" url="javascript:handleActionChange('edit')" isSelected='<%=theScreen.equals("edit")?"true":"false" %>' />
         </logic:equal>
         <logic:equal name="tabButton" value="RIGHTS_BUTTON">
           <content:tabButton label="Rights Mgmt" labelKey="org.jahia.engines.include.actionSelector.RightsMgmt.label" url="javascript:handleActionChange('rightsMgmt')" isSelected='<%=theScreen.equals("rightsMgmt")?"true":"false" %>' />
         </logic:equal>
         <logic:equal name="tabButton" value="FIELDS_RIGHTS_BUTTON">
           <content:tabButton label="Fields Rights Mgmt" url="javascript:handleActionChange('ctneditview_rights')" isSelected='<%=theScreen.equals("ctneditview_rights")?"true":"false" %>' />
         </logic:equal>
         <logic:equal name="tabButton" value="VERSIONING_BUTTON">
           <content:tabButton label="Versioning" labelKey="org.jahia.engines.include.actionSelector.Versioning.label" url="javascript:handleActionChange('versioning')" isSelected='<%=theScreen.equals("versioning")?"true":"false" %>' />
         </logic:equal>
         <logic:equal name="tabButton" value="LOGS_BUTTON">
           <content:tabButton label="Logs" labelKey="org.jahia.engines.include.actionSelector.Logs.label" url="javascript:handleActionChange('logs')" isSelected='<%=theScreen.equals("logs")?"true":"false" %>' />
         </logic:equal>
         <logic:equal name="tabButton" value="CONTENT_DEFINITION_BUTTON">
           <content:tabButton label="ContentDefinition" labelKey="org.jahia.engines.include.actionSelector.ContentDefinition.label" url="javascript:handleActionChange('contentDefinition')" isSelected='<%=theScreen.equals("contentdefinition")?"true":"false" %>' />
         </logic:equal>
       </logic:iterate>
       <content:drawTabButtons />
    </content:tabButtonsList>

    viewLocksURLDisplays the URL that allows to view the locks on a content object.

    Example :

    <bean:define id="myContentContainer" name="myAddress" property="contentContainer" />
    <content:viewLocksURL actionType="deleteContainer" name="myContentContainer" display="false" id="myLockURL"/>
    <logic:present name="myLockURL">
         <a href="<bean:write name='myLockURL'/>">View/release locks</a>
    </logic:present>

    Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
    id, name, display, withJSPopup

    switchModeRolloverdraws the button to switch between view, preview and edit mode with added support for rollover-enabled buttons.

    Basically a <content:switchModeButton> tag with added support for rollover-enabled buttons. The button displays the appropriate image depending if staging is active and the user's current viewing mode. This button is only displayed when the user is logged, or when the guest was set write access on the current page.
    One simply has to give it the names of the pictures used to build the buttons in each state. These names are declared in attributes in the following format :

    • an attribute whose name ends with On refers to the image displayed when the mouse is over its button.
    • an attribute ending with Off refers to the image displayed when the cursor is outside.

    Example :

    <content:switchModeRollover viewOn="view_on.gif" viewOff="view_off.gif" editOn="edit_on.gif" editOff="edit_off.gif" previewOn="preview_on.gif" previewOff="preview_off.gif" />

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    absoluteContainerListinitializes Jahia in order to display a container list referenced using absolute addressing and declares it if required.

    This class extends the ContainerListTag class, it therefore inherits all its attributes. Therefore The reader should refer to containerList tag's documentation for more details.

    The term “absolute” is a little bit misleading, it does not mean that we are retrieving a special kind of container list, but rather that we access a container list on another page. With the containerList tag, only the current page container lists may be retrieved, but absoluteContainerList allows us to retrieve a container list on another page, using absolute addressing of a container list. So we pass an the 'pageID' attribute that contains the page ID for which we want to display the current children in the current recursive pass.

    Example:

    <content:absoluteContainerList name=”addressList” pageId=”3”>
        <!-- tags to display container list here -->
    </content:absoluteContainerList>

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    facesHelperJSF Helper tag. Init the FacesHelper bean and store it in request as FACES_HELPER attribute.

    FacesHelper is the main JSF Helper Bean. It initializes the ProcessingContext and JahiaData objects and store them in request.

    categoriesByPropertiesTag that allows to look up categories by property names and values.

    It supports the "%" characters to do SQL pattern matching in the property name and value. The result is stored in the page context attribute named using the ID parameter and consists of an ArrayList of CategoryBean objects.

    Both the property name and the property value must be set to carry out the search.

    Example : [To Be Completed]

    cListPaginationTotalSizeReturns the total number of containers of the enclosing container list.

    This tag only needs to be enclosed inside the containerList Tag. It is part of the 3 tags (content:cListPaginationFirstItemIndex and content:cListPaginationFirstItemIndex) used to give some information about the navigation through the paginated Container List.

    Note that this is the size returned by containerlist.getQueryContainerList().getFullSize() , not containerlist.getSize()

    See content:cListPagination for more details.

    Example :

    <content:containerList name="directoryPeopleContainer">
       ...
       [<content:cListPaginationFirstItemIndex /> - <content:cListPaginationLastItemIndex />]
       of <content:cListPaginationTotalSize />
       ...
    </content:containerList>

    generates the following HTML:

    [1 - 4] of 4

    cListPaginationNextRangeOfPagesDisplays a button (full link) to jump to the next range of pagination window.

    See content:cListPagination for more details.

    Example :

    <content:cListPagination nbStepPerPage="3">
    <content:cListPaginationPreviousRangeOfPages method="post" <> formName="jahiapageform" title="&#160;..&#160;"/>
    ...

    <content:cListPaginationNextRangeOfPages method="post"
    formName="jahiapageform" title="&#160;..&#160;"/>
    </content:cListPagination>

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    messagedisplay a specific value in a resource bundle and formats it using java.text.MessageFormat.

    Lowest level support for resource bundle messages. This is inspired by the Struts bean message tag except that it checks a session variable (org.jahia.services.multilang.currentlocale) to determine if a Locale has been chosen.

    The value lookup is done in the 'JahiaMessageResources.properties' resource bundle.

    Similar in functionality to content:resourceBundle.

    Example 1 :

    <logic:present name="engineMessages">
    <div id="errors">
      <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates" resourceName="mySettingsErrors"/> : <br/>
      <ul>
      <logic:iterate name="engineMessages" property="messages" id="curMessage">
        <li><content:message name="curMessage"/></li>
      </logic:iterate>
      </ul>
    </div>
    </logic:present>

    The above example takes all the EngineMessage objects in EngineMessages and displays them using the content:message tag. The EngineMessages is instanciated when Jahia detects an error.

    Example 2 :

    <content:message key="org.jahia.bin.JahiaConfigurationWizard.root.adminUserName.label" />

    pagePropertiesURLDisplays the URL that allows to open the properties window of a page.

    Example :

    <content:pagePropertiesURL id="pagePropertiesURL" display="false" />
    <logic:present name="pagePropertiesURL">
       <a href="<bean:write name='pagePropertiesURL'/>">Page properties (popup)</a>
    </logic:present>

    Attributes inherited from tag content:abstractURL (i.e. from class org.jahia.taglibs.field.AbstractURLTag)
    id, name, display, withJSPopup

    engineResourceBundledisplay a specific value from Jahia Engine's ResourceBundle.

    This tag can be used to dynamically request a given resource from the engine resource bundle.

    See content:resourceBundle.

    If the requested resource bundle is missing and useDefault is true, Jahia will look for another engine resource bundle in that order :

    1. Look for the site's default engine resource bundle. Each site can have a default engine resource bundle. Its name must be of this form : "JahiaEnginesResourcesMYJAHIASITE" where MYJAHIASITE is the virtual site's sitekey in uppercase.

    2. Finally if none of the previous resource bundles are available, Jahia will return the default resource bundle named "JahiaEnginesResources".

    Example :

    To request the value of the resource named "stylesheet", you only need to call the tag and provide the resource name:

    <content:engineResourceBundle resourceName="stylesheet"/>

    In the same way, for a resource that is an image, we have something like that:

    <img src="<jahia:serverHttpPath /> <jahia:engineResourceBundle resourceName="headerLogoImg" />" width="126" height="63">

    The generated html code is:

    <img src=”http://127.0.0.1:8080/jahia/jsp/jahia/engines/images/header.gif” width="126" height="63">

    Note the Tag <jahia:serverHttpPath /> is needed to build the full image url.

    This Tag returns the server request URI part of the URL: "http://127.0.0.1:8080/jahia".

    declareContainerListPropThis tag is used to declare a container list property.

    This tag allows to set properties on a container list declaration. These properties are simple string pairs name=value, which can then be retrieved then on the JahiaContainerDefinition.getProperty or JahiaContainerDefinition.getProperties methods.

    Example:

    In this example we show a container list declaration that includes two properties named 'columns' and 'rows' that could then be used to render the container list in for example using a table

    <content:declareContainerList name='mainContentContainerList' title='Main Content'>
    <content:declareContainerListProp name='columns' value='3' />
    <content:declareContainerListProp name='rows' value='2' />
    <content:declareContainer>
        <content:declareField name='title' title='Title' type='SmallText'/>
        <content:declareField name='content' title='Content' type='BigText'/>
        <content:declareField name='image' title='Image' type='File'/>
        <content:declareField name='align' title='Image align' type='SharedSmallText' value='<jahia_multivalue[left:right:default]>left'/>
        <content:declareField name='date' title='Date' type='Date' value='<jahia_calendar[dd mon yyyy / HH:MM]>'/>
    </content:declareContainer>
    </content:declareContainerList>

    integerFielddisplays a Jahia integer field.

    Extends the AbstractFieldTag class.

    Example :

    <content:declareField name="sitemapDepth"
       title="Sitemap Depth"
       type="Integer"
       value="<jahia_multivalue[1:2:3:4:5:6]>2"
       titleKey="sitemapDepth"
       bundleKey="<%=resBundleID%>"
    />
    Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag)
    name, display, defaultValue, pageId, pageLevel, diffActive, valueId

     


    Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.