| |||||||
| FRAMES NO FRAMES | |||||||
When a DateField is declared, it supports a date mask attribute. The date format uses the following syntax: 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 <content:dateField name='mynewsDate' defaultValue='' diffActive='true'/>
name='mynewsDate'
title='News date'
titleKey='newsDate'
bundleKey='<%=resBundleID%>'
type='Date'
value='<jahia_calendar[dd mon yyyy]>'
/>
Attributes inherited from tag content:abstractField (i.e. from class org.jahia.taglibs.field.AbstractFieldTag) name, display, defaultValue, pageId, pageLevel, diffActive, valueId
| Tag Information | |
| Tag Class | org.jahia.taglibs.field.DateFieldTag |
| TagExtraInfo Class | None |
| Body Content | empty |
| Display Name | None |
| Attributes | ||||
| Name | Required | Request-time | Type | Description |
| display | false | true | java.lang.String | name of the bean to copy the field into. |
| display | false | true | boolean | display field content or not. Example 1: <content:bigTextField name='interest' defaultValue="This is interesting" diffActive="true"/> The above displays the contents of the 'interest' bigTextField. Example 2: <content:bigTextField name='title' defaultValue="" diffActive="true" display="false" valueId="thetitle"/> Since the display attribute of the 'title' field is false, the field isn't displayed. This is because we only want to generate the <h4> tag when the 'title' is valid. |
| name | false | true | java.lang.String | name of field to display. |
| defaultValue | false | true | java.lang.String | default of value of field if not already initialized. Markers Introduction: A marker is very similar to an HTML tag, it is an enclosure for a string, that tells Jahia that it is not handling a regular string default value, but rather that it must process the default value using certain sub-systems in order to generate the values that will be displayed in the edition GUI popup. The default value can either include a value or a special marker to allow a set of values. These will appear as options in a drop down box in the editing engine. A default value in the set of values can also be preselected. The syntax is as follows: defaultValue="<jahia_multivalue[value1:value2:value3]>" (displays three choices for this field and allows the user to only pick one) defaultValue="<jahia_multivalue_single[value1:value2:value3]>" (ditto) defaultValue="<jahia_multivalue[value1:value2:value3]>value1" (ditto but with value1 as the default selection) defaultValue="<jahia_multivalue_multiple[value1:value2:value3]>" (displays three choices for this field and allows the user to pick one or more) defaultValue="<jahia_multivalue_multiple[value1:value2:value3]>value1" (ditto but with value1 as the default selection) The jahia_multivalue marker is supported by the Integer, Float, SharedSmallText and Smalltext fieldtypes. The default value of the field can also by directly specifying which resource bundle item to use, instead of using the content:resourceBundle tag. The syntax is as follows: <jahia-resource id="MySiteResource" key="product.001" default-value="Crew"/> (inserts the text from at key product.001 of resource bundle MySiteResource and defaults to Crew if it cannot find it) Since version 4.0.X, Jahia supports expression markers compatible with Apache's Java Expression Language (JEXL) specification. An example is given below: <jahia-expression expr="user/username" storeMarker="false"/> (retrieves the current username. If storeMarker was set to true, the expression would not be resolved and stored uninterpreted) |
| pageId | false | true | java.lang.String | the Page ID of the page which contains the desired field. Example <content:bigTextField name="testField" pageId="3"/> This displays the field called "testField" that is present on page 3. |
| pageLevel | false | true | java.lang.String | the Page ID of the page which contains the desired field. page 1 -> page 2 -> page 3 -> page 4 and given that we are currently on page 4, the following code : <content:bigTextField name=�testField� pageLevel=�1� /> will display the field called "testField" that is present on page 1. |
| diffActive | false | true | boolean | highlight the differences between the staging and live mode of this field. The differences are conveyed by changing the style of the modified text -and adding new text if necessary. The text below is the original bigTextField content: We now edit it by deleting 'please', changing 'lunch' to 'diner' and adding 'I am a nice person'. In compare mode, Jahia will generate the following accociated highlights:
|
| valueId | false | true | java.lang.String | name of bean to copy this field's value into. This bean is accessible to the rest of the page since it's stored in the PageContext object ('a PageContext instance provides access to all the namespaces associated with a JSP page'). JSP pages containing fields defined with identical valueId are supported; however each field tag will destroy any previously created bean with the same name. Refer to attribute 'display' for an example. |
| Variables | No Variables Defined. |
| |||||||
| FRAMES NO FRAMES | |||||||