Adding position in item view

Adding position in item view

  • Published by
    Yannick Berges
  • Last modified
    19 February 2018
  • Voting
    Average rating
    2 votes
  • Favourites
  • Concerns
  • Since Version
  • Up to date
  • Profile concerned
    Webdesigner, Developer


Be carefull, all template are update after all FLEXIcontent component update.

I recommend to use html5 template.

Duplicate Template

  1. Choose your template to copy (blog doesn't have tab, if you need it use items-tabbed)
  2. Click on duplicateflexi-dup-temp1.png
  3. Rename itflexi-dup-temp2.png
  4. Close the popup

To allow drag and drop position we need to add a position in XML

Edit your template in single content column

  1. Go to edit file tab
  2. Edit item.xmlflexi-add-position1.png
  3. Use "New position for displaying fields" button to copy snapshot code
  4. Put in in fieldgroup part
  5. Rename  myposition like informations (don't use space or é...)flexi-add-position2.png
  6. Save fileflexi-add-position3.png
  7. Save template

Now you can drag and drop field in position. But no field were display because we need to add php code for render

Adding PHP code for render all fields in position

  1. Go to edit file tab
  2. Edit item_html5.phpflexi-add-php1.png
  3. Use" load/customize system's default" to give the original code and edit it
  4. Click on "Use display all fields of a position" button
  5. Check the code and remplace   $_position_name = "myposition" by $_position_name = "informations" (same name of position in XML)flexi-add-php2.png
  6. Copy code
  7. Past in template code where you want to display
  8. Save fileflexi-add-php3.png
  9. Save template

That it, now you can drag and drop your fields in your position !

Use field without position

  1. Put your field in render only positionflexi-render-only.png
  2. Edit item_html5.php
  3. Use button "Display a field of 'renderonly' position"
  4. Change ["fieldname"] by ["yourfieldname"]flexi-render-only2.png
  5. Copy code
  6. Past in template field where you want to display
  7. Save file
  8. Save template

Enjoy !

© 2018 Flexicontent. All Rights Reserved.
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
These cookies are needed to make the website work correctly. You can not disable them.
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics