Form2Content template parameters

Getting the data into your Joomla article!

PLEASE NOTE:We are in the process of completing the list. More parameters can be found here.

This is a list of F2C template parameters. They are used in F2C (article) templates to render information from the submission form into the Joomla article. This mechanism is realised using the Smarty template engine allowing for extra flexibility. A simple example is using the article title in your content:

<h2>{$JOOMLA_TITLE} was written by {$JOOMLA_AUTHOR}</h2>

Template parameters are either related to the Joomla article, think off author, title, date created etc. or to F2C fields, think of image path, text or url. Please check compatibility when using template parameters!

Click on the row to get an example of use and see related documentation.
Name
Parameter
J! version
F2C version
Field type
Article title

{$JOOMLA_TITLE}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Joomla article field

Article title

The article title as used in Joomla.

Example:

<h1>{$JOOMLA_TITLE}</h1>

Joomla article ID

{$JOOMLA_ID}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Joomla article field

Joomla article ID

The Joomla article ID (of the article created by F2C) can be used in combination with 3rd party plugins or to create a unique ID (if it isn't part of your Joomla template).

<div class="{$JOOMLA_ID}">Article ID: {$JOOMLA_ID}</div>

Joomla article link

{$JOOMLA_ARTICLE_LINK}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Joomla article field

Joomla article link

Creating a custom read more link can be achieved with 3rd party plugins or with this template parameter. The output is a Joomla URL for the created article without item ID (since it doesn't exist when we create the article). Now yo can switch off read more in category blog layout and create a link of your introduction image!

<a class="readmore" href="/{$JOOMLA_ARTICLE_LINK}">Read more ...</a>

We recommend you to use the {$JOOMLA_ARTICLE_LINK_SEF} parameter in Joomla 1.7 because of item id issues! Read the related article for more information.

Related documentation

Joomla 1.7 SEF URLs & F2C
Joomla SEF article link

{$JOOMLA_ARTICLE_LINK_SEF}

Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Joomla article field

Joomla SEF article link

This template parameter requires the use of the F2C Core SEF plugin.

Creating a custom read more link can be achieved with 3rd party plugins or with this template parameter. Now yo can switch off read more in category blog layout and create a link behind your introduction image!

<a class="readmore" href="/{$JOOMLA_ARTICLE_LINK_SEF}">Read more ...</a>

(without the / which the code plugin adds)

Related documentation

Joomla 1.7 SEF URLs & F2C
Field value

{$< FIELDNAME >}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
F2C general

Field value

The {$< FIELDNAME >} is the most common used template parameter whereby the < FIELDNAME > is replaced with the unique name YOU have given your fields.

The output of {$< FIELDNAME >} depend on the type of field and can be a simple string, html, image or url. See related documentation for more information per F2C field type.

Field description

{$< FIELDNAME >_DESCRIPTION}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
F2C general

Field description

The description is often used to inform the submitter on what is expected. As in the submission form it can be shown in popup or mouse over if used in combination with a 3rd party plugin.

Example using JCE Mediabox plugin (which uses a class as trigger).

<div class="jcetooltip" title="{$< FIELDNAME >_DESCRIPTION}">More information>

Checkbox

{$< FIELDNAME >}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Pro compatible
Checkbox

Checkbox

The template parameter for a checkbox field type renders TRUE or FALSE. It is thus best used as a condition for Smarty.

{if $< fieldname >}
Checkbox is checked
{else}
Checkbox is unchecked
{/if}
Display list

{$< FIELDNAME >}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Pro compatible
Display list

Display list

The display list renders an ordered or unordered list form the list of values submitted.

{$< FIELDNAME >}

Will render (< ol > or < ul > depending on choice):


<ul>
<li>Value 1</li>
<li>Value 2</li>
</ul>

Image field

{$< FIELDNAME >}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Image

Image field

The output depends on the setting in the image field which can either be RAW (url to the uploaded image file) or HTML TAG (image html tag with link to the image).

Since the start we have added two extra parameters in F2C Pro, namely {$< FIELDNAME >_RAW} and {$< FIELDNAME >_IMAGE}.

For use please read the related documentation.

 

Related documentation

Image field
Image html tag

{$< FIELDNAME >_IMAGE}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Pro compatible
Image

Image html tag

This will output an HTML image tag linked to the (re-sized) image. If you don't want to 'build' the < img > tag yourself it's easy to use. Do note that target settings etc. are not part of the tag.

Related documentation

Image field
Image alt value

{$< FIELDNAME >_ALT}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Image

Image alt value

The following example shows the use of the different image template parameters. Make sur you have alt & title input shown in your form!

<img src="http://documentation.form2content.com/{$< FIELDNAME >_RAW}" border="0" alt="{$< FIELDNAME >_ALT}" title="{$< FIELDNAME >_TITLE}" width="{$< FIELDNAME >_WIDTH}" height="{$< FIELDNAME >_HEIGHT}" />

Related documentation

Image field
Image title value

{$< FIELDNAME >_TITLE}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Image

Image title value

The following example shows the use of the different image template parameters. Make sure you show alt & title input in your form!

<img src="/{$< FIELDNAME >_RAW}" alt="{$< FIELDNAME >_ALT}" width="{$< FIELDNAME >_WIDTH}" height="{$< FIELDNAME >_HEIGHT}" title="{$< FIELDNAME >_TITLE}" target="_blank" / >

Related documentation

Image field
Image width

{$< FIELDNAME >_WIDTH}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Pro compatible
Image

Image width

The following example shows the use of the different image template parameters. Make sure you show alt & title input in your form!

<img src="http://documentation.form2content.com/{$< FIELDNAME >_RAW}" border="0" alt="{$< FIELDNAME >_ALT}" title="{$< FIELDNAME >_TITLE}" width="{$< FIELDNAME >_WIDTH}" height="{$< FIELDNAME >_HEIGHT}" />

Related documentation

Image field
Image height

{$< FIELDNAME >_HEIGHT}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Pro compatible
Image

Image height

The following example shows the use of the different image template parameters. Make sure you show alt & title input in your form!

<img src="http://documentation.form2content.com/{$< FIELDNAME >_RAW}" border="0" alt="{$< FIELDNAME >_ALT}" title="{$< FIELDNAME >_TITLE}" width="{$< FIELDNAME >_WIDTH}" height="{$< FIELDNAME >_HEIGHT}" />

Related documentation

Image field
Image path (relative)

{$< FIELDNAME >_PATH_RELATIVE}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Image

Image path (relative)

This renders the path (URL) from the Joomla images/stories directory to the (re-sized) image. Great to use with 3rd party plugins which work with the ROOT set as images/stories.

If you need to build a URL and use this parameter make sure you add the images/stories/!!

Related documentation

Image field
Image folder url

{$F2C_IMAGES_PATH_ABSOLUTE}

Joomla 1.5 compatible Joomla 1.7 compatible
F2C Lite compatible F2C Pro compatible
Image

Image folder url

This renders the full (absolute) url to the FOLDER in which ALL the images for an ARTICLE are saved. The number of images depends on the number of image fields and the number of actual uploads.

The url look like this whereby the P relates to the F2C content type and F to the article.

domainname.com/images/stories/com_form2content/p1/f24

Related documentation

Image field