How to render item view in custom code

  • Published by
    George Papadakis
  • Last modified
    28 October 2013
  • Up to date
    Yes
  • Profile concerned
    Developer
  • Concerns
    Component
  • Since Version
    1.5.6
  • Voting
    Average rating
    2 votes
    • 1
    • 2
    • 3
    • 4
    • 5
  • Favourites
    294 How to render item view in custom code /documentation/tutorials-english/70-developer-api-field-plugins/294-how-to-render-item-view-in-custom-code.html

This code for rendering the item view of an item, this is meant for developers

require_once (JPATH_ADMINISTRATOR.DS.'components/com_flexicontent/defineconstants.php');
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'tables');
require_once("components/com_flexicontent/classes/flexicontent.fields.php");
require_once("components/com_flexicontent/classes/flexicontent.helper.php");
require_once("components/com_flexicontent/models/".FLEXI_ITEMVIEW.".php");
 
$itemid = 471;
$flexi_html_helper = new flexicontent_html();
$item_html = $flexi_html_helper->renderItem($itemid);
echo $item_html;