InterJinn

Development Framework For PHP

Embed: {jinn:property}

Abstract

The property embed will be every web developer's dream-come-true. By using this embed you can include content that is loaded from the database. For information about how to define a property and how they function you should refer to the section on properties. There are several attributes you may use to fully describe the property you want and it's behaviour. It is important to note that if the site is multilingual then all features of multilingual property resolution will still be valid.

Attribute - dynamic

A value of true or false must be given to this attribute. If not specified then the default is false. When set to true the property value will not actually be inserted at compile time, instead a call to load the property will be inserted which will run each time the page is accessed. The difference may seem small, but if the value is true then updating the property value in the database will be seen on the web page as soon as the property cache is flushed -- although this depends on the property type. A property of type query could easily keep the value retrieved from a feed up to date in the content. The downside is that the load time of the page will take a small performance hit.

Attribute - canonical

The value of this attribute will canonically describe a property to retrieve. The format is [group]:path:name. This is a convenient shorthand for including property values in your content.

Attribute - group

The group to which the property belongs as described in the properties section. This attribute is ignored if the canonical property is set.

Attribute - path

The path to which the property should be resolved as described in the section about proeprties. This attribute is ignored if the canonical property is set.

Attribute - name

The name of the property as set in the properties table. This attribute is ignored if the canonical property is set.

The following example illustrates the difference between using the embed with the canonical attribute and without. It is plain to see that the canonical incarnation is less wordy; however, it is also less readable.

Example:
{jinn:property
    group=help,
    path=sitemap/navigator,
    name=linkHelp,
    dynamic=true}
Canonical Example:
{jinn:property
    canonical=help:sitemap/navigator:linkHelp,
    dynamic=true}