Her er du:

Indhold

Elements as variables

The most powerful feature of the Dynamic Zoo Description is the ability to render other elements.

Below we will show how to use element variables inside the category description element.

The general syntax:

{zoo_item: item ID element: Element Name config:"par1":"val1","par2":"val2"]}


General rules

  • Case matter - The element names are case sensitive.
  • Be carefull with the spaces no space after "{" - no space before "}"
  • Check the names of your core elements - with might vary depending on your zoo version

Usefull examples

Render item name of a specific item:

{zoo_item: 144 element: Name}

'Name' is a core element and it can be used on any item. This will simply output the name of the item with ID 144


Render your own custom element of a specific item:

{zoo_item: 144 element: Custom Link}

'Custom Link' is a custom element i have added to this specific type of items. This will output the value of this element on item ID 144.


Render the element of the item in which the text is displayed:

{zoo_item: 0 element: Version}

0 equivalent to

$this->item. This might be extremely usefull making texts dynamic.


Output elements with configuration

Render the item categories with configuration on specific element:

{zoo_item: 144 element: Item config:"separated_by":"separator=[ - ]"}

This will output all related elements of $this->item seperated by "-"


Render my custom element 'My Related Items' with configuration:

{zoo_item: 0 element: My Related Items config:"separated_by":"separator=[ - ]"}

This will output all related elements of $this->item seperated by "-"


More about config option

The configuration options depend on the type of element. Different elements have different configuration options

Go to: media/zoo/elements/ELEMENTNAME/ELEMENTNAME.xml, to see the configuration options of a element

Zoo core elements and config options

  • Access
  • Author
  • Categories
    • Link category
    • Seperated by
  • Comments Link
    • Single Comment Text
    • Multiple Comments Text
    • No Comments Text
  • Creation Date
    • Date Format
    • Custom format
  • Edit
  • Frontpage Enabled
  • Hits
  • Item Link
    • Link Text
  • Modification Date
    • Date Format
    • Custom format
  • Name
    • Link to item
  • Print
    • Show icon
    • Show Comments
  • Publish Down Date
    • Date Format
    • Custom format
  • Publish Up Date
    • Date Format
    • Custom format
  • Previous/Next Link
  • Searchable
  • State
  • Tags
    • Link to tag
    • Seperated by
Oprettet af: Casper Nøhr Hansen | I kategori: Category DescriptionJoomla! | Oprettet: Saturday, 10 October 2015 | Opdateret: Tuesday, 23 February 2016

Comments (0)

Leave a comment

You are commenting as guest.