FLEXIcontentのテンプレート「blog」 Joomla拡張










  1. blog
  2. default
  3. faq
  4. item-tabbed
  5. presentation





  • 個別記事
    • Basic
    • Modular
  • リスティング
    • Columned listing
    • Table listing
    • Per sub-category placement
    • Tab / slider item placement
    • Modular listing




  • item.php
  • item_html5.php


常にitem.phpが呼び出され、FLEXIcontentテンプレート(Basic)のDisplay ParametersとしてHTML5が設定されている場合にitem_html5.phpをitem.phpから呼び出しています。

Use Globalは現行バージョンの3.0.8ではPHPコード、つまりitem.phpに設定されたデフォルト、xHTMLが使われます。



echo $this->item->プロパティ名;
echo $this->fields['フィールド名']->value;




This object contains all information regarding your own content
You can call it this way $this->item->”property”

id Identifier in the database
title title
alias alias
introtext Introduction text
fulltext All the text
state Status of publication (1 : publish, 0 : not publish, -1 : archived, -2 : delete, -3 : pending, -4 : draft, -5 : in progress )
sectionid Section
catid Main category
created Creation date
created_by Author id
created_by_alias Author alias
modified Last modification date
modified_by Id of the last author who has modified section
publish_up Start date of publication
publish_down End date of publication
version Version id
ordering Number indicating the rank order
metakey Keywords meta data
metadesc Description of meta data
metadata Metadata robots and author
access Access Level (0 : public, 1 : private, 2 : special)
hits Number of visits
item_id Content id
type_id Type id
language Language (fr-FR, en-US)
search_index All text is indexed for search
cataccess Access level of the category (0 = public, 1: Private 2: Special)
catpublished Indicates whether the category is published or not
author Author name
usertype Group name of the User
typename Label the type of content
creatoremail Email the original creator
modifier Name of last author who made a change
text Text (description field) to be displayed in the template (introduction or full text)
cats Table listing the categories associated (cats [x] -> id, cats [x] -> title …)
fields See details in the next chapter item->fields
readmore_link Way to link to the “read more»
positions See details in the next chapter item->Positions
fieldvalues List the value of fields in a table (FieldValues [id_du_champs] [x])
favs Number of users who added the content in their favorite
fav Indicates whether the content can be placed in favorites
vote Object with the following values: rating_sum (average value of votes), rating_count(votes) lastip (last ip address voting).
creator Creator name

item->fields or fields

This way you can get all the information about the fields in your template, either for the core fields (title, text, created, created_by, modified, modified_by, hits, document_type, version, state, voting, favorites, categories , tags) but all your custom fields (as you have named them) that are associated with the type being displayed.
You need to call it this way $this->item->fields[‘field name’]->”property” or so $this->fields[‘field name’]->”property”

id Fields id
field_type Field type
name Field name
label Field label
description Field description
isfilter Return true if this is a filter
isearch The field is being used for search ?
isadvsearch The field is being used for advanced search ?
published Published or not ?
access Access Level (0 : public, 1 : private, 2 : special)
ordering Number indicating the rank order
value Value of the field
display Show the formated value of the field

Each field also has parameters that can be recovered in this way (object JParameter:)

$this->item->fields[‘field name’]->parameters->get(‘parameter’)

Here are the main parameters that can be found, not all are used depending on the type of field.

display_label Display the label
emove_space Delete spaces
pretext Prefix
posttext Suffix
default_value Default value
allow_multiple Allow multiple value
max_value The number of value maximum
size The field size
separatorf Separator values for the frontend
opentag The open tag
closetag The closing tag
date_format Standard siplay format of date
custom_date Custom display format date
rows Number of ligne in the textarea
cols Number of row in the textarea
use_html The HTML editor is enabled ?


As we saw previously you can browse through all positions of a template to display your fields. Here are the details of the information you can use.

You need to call it this way $this->item->positions[‘name of position][‘field name’]->”property”

id Id of the field
name Name of the field
label Label of the field
display Formated value of the field


This object type juser gives you information about the user currently logged
A call in this way $this->user->”property”

id User id
name Name of the user
username Login of the user
email Email of the user
usertype Address of the user
registerDate Date of registration
lastvisitDate Date of last connection


It is an JParameter object that will allow us to find the settings related to the content.

$ this-> params-> get (‘parameter’)

flexi_section FLEXIcontent associated section
comments Enable input ( 0= no comment, 1 and 2 = JComments and JomComments)
support_url Url Support
flexi_fish Enable the Joomfish support
filtercat Filter the category view
filtertag Filter the tags view
use_versioning Enable the versioning
nr_versions Version stored
show_title Content title
link_title Link title
show_readmore Read More link
show_icons Icons
show_pdf_icon Display PDF icon
show_print_icon Display Print icon
show_email_icon Display Email icon
limit Number of element by page
catlimit List limit (category)
upload_extensions Allowed Extensions (File Types)
upload_maxsize Max Size
file_path Secure path to the directory
media_path Secure path to the media
restrict_uploads Restrict upload
check_mime Check the MIME types
image_extensions Extensions of images allowed (File Types)
ignore_extensions Ignored Extensions
upload_mime MIME types allowed
enable_flash Enable the upload using flash
feed_summary For each rss feed
advcache Advanced cache
adcache_time Time of the cache
advcache_guest Only visitor
disablecss Disable the css
item_depth Item level
add_item_pathway Add a path
show_page_title Page title
menu_image Image Menu
secure Enable SSL
page_title Display the page title
page_description meta description

It is an JParameter object that will allows us to find the parameters associated with the content menu that must be displayed.


item_depth Level of the element
add_item_pathway Add a path
page_title Page title
show_page_title Show the page title
pageclass_sfx CSS class suffix
menu_image Image of the menu
secure SSL active

The flexicontent_html class

The flecicontent_html class offers some useful functions for our template.

Function striptagsandcut

This feature allows us to remove html tags from a text and cut cleanly after a certain number of characters.

// This exemple va will format and truncate $mon_texte after 100 characters
echo flexicontent_html:: striptagsandcut ( $mon_texte,100 )
Function extractimagesrc
// This exemple will generate a image tag with the needed parameters
echo flexicontent_html:: extractimagesrc ( $this->fields[‘mon_champ_image’]);
Function printbutton

This exemple will display the button and the link to print the current content

// Cet exemple will display the print icon in ou content
echo flexicontent_html::printbutton( $this->print_link, $this->params );
Function mailbutton

This exemple will display the button and the link to recomment the current content via email

// This example will display the icon Send by mail 
echo flexicontent_html::mailbutton( 'items', $this->params, null , $this->item->slug );
Function pdfbutton

This will display the button and the link to generate active content in pdf

// This exemple will display an pdf icon into the active content
echo flexicontent_html::pdfbutton( $this->item, $this->params )