Output Override Not Working

More
13 years 2 months ago #14008 by rubenreyes
I am trying to customize the HTML output for Flexicontent pages and categories.

My first attempt was to follow the standard Joomla way of overriding the component output. I created the file /templates/mytemplate/html/com_flexicontent/items/default.php and it didn't work (I tried with all views).

Then I used the Flexicontent templates function. I created a new template and modified item.php to make it super simple:
Code:
<?php if ($this->params->get('show_title', 1)) : ?> <h1><?php echo $this->escape($this->item->title); ?></h1> <?php endif; ?> <?php foreach ($this->item->positions['Content'] as $field) { echo $field->display; } ?>

However there is still a lot of Flexicontent JS and CSS loaded on the page, as well as some inline <script>. I tried to "unload" the JS and CSS both in item.php and in my Joomla template's index.php by using:
Code:
$document =&JFactory::getDocument(); unset($document->_stylesheets['/components/com_flexicontent/assets/css/flexicontent.css']); unset($document->_stylesheets[$this->baseurl . '/components/com_flexicontent/assets/css/fcvote.css']); unset($document->_scripts[$this->baseurl . '/components/com_flexicontent/assets/js/fcvote.js']); unset($document->_scripts[$this->baseurl . '/components/com_flexicontent/assets/js/fcfav.js']); unset($document->_scripts['/media/system/js/tabs.j']); unset($document->_scripts['/plugins/system/flexiaccess/flexiaccess.js']);

and the only one that would be removed is /plugins/system/flexiaccess/flexiaccess.js when using the code in index.php.

This is very frustrating because it seems that Flexicontent does not follows Joomla standards.

Do I need to hack Flexicontent component code to get this done? Or is there a clean way to achieve this?

By the way: please don't challenge my rationale for wanting to remove the JS and CSS. I know it is used for voting, sorting, etc. etc. but we don't use any of that in this site.

Thank you! :D

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #14014 by micker
Replied by micker on topic Output Override Not Working
hello
why you want to overwide
creat your template is more simply no ?
read this with google translate
www.flexicontent.org/forum/index ... =viewtopic
it's possible to charge script with item.xml and category.xml
regards

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #14143 by rubenreyes
I guess I forgot to mention why: flexicontent keeps adding a bunch of javascript and css to the <head> and <body> of the html output that I don't need or want and that is not controlled from the template.

Even if index.php is empty the following js and css are added:
/components/com_flexicontent/assets/css/flexicontent.css
/components/com_flexicontent/assets/css/fcvote.css
/components/com_flexicontent/assets/js/fcvote.js
/components/com_flexicontent/assets/js/fcfav.js
/media/system/js/tabs.j
/plugins/system/flexiaccess/flexiaccess.js
plus script tags directly on the body.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.282 seconds
Save
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
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline