Call fields in your custom template

Call in custom content template any attribute of a field, the value of the field but label, description, maxlenght, style too... This list is not complete.

Call in custom content template any attribute of a field, the value of the field but label, description, maxlenght, style too... This list is not complete.

Attribute Description

General @$jSeblod->field_name->attribute
value return value of the field (most important attribute)
title return title of the field
label return label of the field
description return description of the field
html return html code of the transformed field *
* see html typography, example for a upload image field img src="/*value*" alt="*title*"

Core com_content $this->content->attribute
id return numeric identifier of the content
title return title of the content
alias return alias of the content (SEF)
state return published state (Published=1, Unpublished=0, Archived=1, Trashed=2)
sectionid return numeric identifier of content section
catid return numeric identifier of content category
created return creation date of the content
created_by return numeric identifier of the content author
created_by_alias return username (alias) of the content author
modified return modification date of the content
publish_up return begin publication date of the content
publish_down return end publication date of the content
access return numeric identifier of the content access level
metakey return meta keywords of the content
metadesc return meta description of the content
art_link return link to the content (SEF compatibility)
editart_link return link to the content edition

Special Core com_content $this->content->attribute, attributes available in com_content and some modules but not everywhere
section return section title of the content
category return category title of the content
author return author of the content
usertype return group of the content author
group return access level of the content (see access)
hits return hits of the content
rating return vote number of the content

User Core $this->user->attribute, if user is logged!
name return name of the user
username return username of the user
email return email of the user
usertype return group of the user
registerDate return registration date of the user

Upload Image @$jSeblod->field_name->attribute
value return path of the image (main)
thumb1 return path of the first thumb image
thumb2 return path of the second thumb image
thumb2 return path of the third thumb image

FieldX @$jSeblod->field_name[$i]->attribute
attributes of the repeated field @$jSeblod->field_name[$i]->value
@$jSeblod->field_name[$i]->label
for ( $i = 0, $n = count( @$jSeblod->fieldX_name ); $i < $n; $i++ ) {
echo @$jSeblod->fieldX_name[$i]->attribut;
}
echo @$jSeblod->fieldX_name[0]->attribut;
echo @$jSeblod->fieldX_name[1]->attribut;
Get link: @$jSeblod->fieldX_name[$i]['art_link']->value;
...

External Article @$jSeblod->field_name['name_of_a_external_article_field'] ->attribute
all attributes from all fields of the external article

@$jSeblod->field_name['artist_title']->value
@$jSeblod->field_name['artist_title']->label

@$jSeblod->field_name['art_link']->value (generic link to article)

* 2 deep levels: if a current article called a first external article and this first external article called a second external article, you can get in the current article a field value of the second external article.

List File @$jSeblod->field_name->attribute
value return path of the file, all file paths if multiple format
download return link to download the file (supported format: zip, pdf, doc, xls, ppt, exe, gif, png, jpg, jpeg, mp3, wav, mpeg, mpe, mov, avi, flv, tiff, csv, txt, mp4, rar)
downloaded return the number of download, download counter

Group @$jSeblod->field_name[$i]['name_of_a_field_in_the_group'] ->attribute
attributes of the repeated group @$jSeblod->field_name[$i]['name_of_a_field_in_the_group']->value
@$jSeblod->field_name[$i]['name_of_a_field_in_the_group']->label
if external article field in the group @$jSeblod->field_name[$i]['name_of_external_field_in_the_group']['field_name_from_external_article']->attribute
for ( $i = 0, $n = sizeof( @$jSeblod->field_name) - 1; $i < $n; $i++ ) {
echo @$jSeblod->field_name[$i]['name_of_a_field_in_the_group']->attribut;
}
echo @$jSeblod->field_name[0]['name_of_a_field_in_the_group']->attribut;
echo @$jSeblod->field_name[1]['name_of_a_field_in_the_group']->attribut;
...
Lapoux
November 11, 2011
1338

About Author

sebastien_lapoux

Sebastien

Lapoux

France
Production Manager @Octopoos.