Text Size

Members login

Recommend Print

How to Override View

  • Published by
    Georgios Papadakis
  • Last modified
    29 January 2012
  • Up to date
    Yes
  • Profile concerned
    Webdesigner, Developer
  • Concerns
    Component Template
  • Since Version
    1.5.6
  • Voting
    (1 vote)
  • Favourites
    Add to favourites

-- Normally you must not change FLEXIcontent core files, for consistency reasons plus they are overwritten when you upgrade FLEXIcontent.
-- But you can use a joomla template override for customizing any template file of FLEXIcontent view.

The template files of all FLEXIcontent view are
components/com_flexicontent/views/...
/tmpl/default.php
components/com_flexicontent/views/.../tmpl/form.php
components/com_flexicontent/views/.../tmpl/special.php

e.g. the default template of view myview is
components/com_flexicontent/views/myview/tmpl/default.php

To create a customization override view of it

  1. copy above file to templates/mytemplate/html/com_flexicontent/myview/default.php 
  2. modify it, to suit your needs

Now you can upgrade to newer FLEXIcontent versions without losing your customizations

tags
view example:
components/com_flexicontent/views/tags/tmpl/default.php
copy to:
templates/mytemplate/html/com_flexicontent/tags/default.php 

search view example:
components/com_flexicontent/views/search/tmpl/default.php
components/com_flexicontent/views/search/tmpl/default_error.php
components/com_flexicontent/views/search/tmpl/default_form.php
components/com_flexicontent/views/search/tmpl/default_results.php
copy to:
templates/mytemplate/html/com_flexicontent/search/default.php
templates/mytemplate/html/com_flexicontent/search/default_error.php
templates/mytemplate/html/com_flexicontent/search/default_form.php
templates/mytemplate/html/com_flexicontent/search/default_results.php

TIP 1: You can -not- override the view file components/com_flexicontent/views/myview/view.html.php, but you can copy code from this file, to your joomla template overrideTIP 2: You can use create many different templates, e.g. template1.php , template2.php, template3.php and link to them by creating joomla menu items of type external link:
  • index.php?option=com_flexicontent&view=myview&layout=template1
  • index.php?option=com_flexicontent&view=myview&layout=template2
  • index.php?option=com_flexicontent&view=myview&layout=template3

Community

ggppdk : Online 192 mins yaK2manD : Online 310 mins xhyman : Online 415 mins netcoupe : Online 27252 mins
Members Online: 4

Latest Comments

Latest Forum Posts

Posted by yaK2manD - 17/05/2012 17:51
Posted by ggppdk - 17/05/2012 17:47
Posted by yaK2manD - 17/05/2012 17:41
Posted by algardata - 17/05/2012 16:45
Posted by yaK2manD - 17/05/2012 14:56
Posted by ggppdk - 17/05/2012 14:44