Creating an extra Field POSITION in a custom template

  • Published by
    George Papadakis
  • Last modified
    27 April 2016
  • Up to date
    Yes
  • Profile concerned
    Webdesigner, Developer
  • Concerns
    Template
  • Since Version
    1.5.4
  • Voting
    Average rating
    2 votes
    • 1
    • 2
    • 3
    • 4
    • 5
  • Favourites
    255 Creating an extra Field POSITION in a custom template /documentation/tutorials-english/70-developer-api-field-plugins/255-creating-an-extra-field-position-in-a-custom-template.html
  • Tags
    templates

UPDATE:
with v3.0.x you can edit XML and PHP file from inside the backend layout manager of FLEXIcontent
with v3.0.14+ you do not need to clean the cache

1. Duplicate a template e.g. 'default' to a new template '[b]mydefault[/b]'

2. Goto to components/com_flexicontent/templates/mydefault/

3. Edit item.xml to add a new FIELD position e.g. 'mytable', then clear Joomla cache in backend

4. Edit item.php to get fields of mytable position and add a LOOP to display the fields,
NOTE: you can copy-paste an existing position and alter it.

5. Go to backend and edit ITEM LAYOUT of mydefault TEMPLATE and add the fields you need

6. Go to frontend and display the item, correct and mistakes you have in item.php

Read more in template tutorial:
http://blog.netassopro.com/tutoriel-template-flexicontent-part1-la-structure/