Is there a way to override plugin output? I want to override the Phoca Gallery plugin to use <ul><li> instead of <div>'s.
Thanks
Phoca Gallery output (templates) is written in Joomla! MVC pattern so it can be overriden by template.
You need to copy in your template directory HTML this file: phocagallery.php
Then edit for example $output .= '<div class="detail" style="text-align:right">';
to $output .= '<ul class="detail" style="text-align:right">';
Related
I am writing a Joomla module that includes a custom CSS stylesheet:
$document->addStyleSheet("modules/mod_custommenu/css/custommenu.css");
Now, this module needs to allow for customization of several CSS properties. I could include CSS inline in the module template, but I'd rather reference a separate file. I would like to:
Reference a separate CSS object (via URL)
Generate that CSS file using Joomla templates, like:
.custommenu_<?php echo $module->id; ?> .menutitle {
color: <?php echo $params->get('titlecolor'); ?>;
}
If possible, cache the rendered CSS file so Joomla doesn't need to generate it everytime it is accessed.
How can I do this? Or what is the correct approach for generating ad-hoc module CSS files?
I have trouble with joomla 3.3.3 site. When my Firendly url is off this url with task works fine
<?php echo JText::_('EZWATCHLISTS_DELETE')?>
but when i turn ON Friendly url task is ignored.
NOTICE: When I look in file inspector I see link like this:
and when copy paste that link then task works fine.
Please help.
With Joomla, you should use the JRoue class which will take care of all your URLs for you, whether you have SEF enabled or disabled. So change you code to the following:
<a href="<?php echo JRoute::_('index.php?option=com_ezwatchlists&task=delete&rowid=' . $row->id); ?>">
<?php echo JText::_('EZWATCHLISTS_DELETE'); ?>
</a>
For more information, have a read of the following:
https://docs.joomla.org/Supporting_SEF_URLs_in_your_component
Hope this helps
I am trying to include a custom JS file into my joomla site. What I did is to edit the template's index.php file, and add <script src='custom.js"></script> right before </head>. But when the page is loaded, there are two other JS files loaded after my custom JS file. I thought by inserting my script loading line right before the closing head tag, my JS file should be the last one to load. What could possibly load those 2 JS files after my JS file, and how?
Try this,
you can use addCustomTag option this will not load the JS file inside your head tag but it should be last (from where you are calling there it load.)
$stylelink .= '<link rel="stylesheet" href="../css/IEonly.css" />';
$document = JFactory::getDocument();
$document->addCustomTag($stylelink);
For more details
Hope it works..
There is an option to specify execution of the script after page has loaded (defer). This is a HTML feature and addScript() exposes this in its interface. Doc: https://docs.joomla.org/JDocument/addScript
Example:
$document = JFactory::getDocument();
$document->addScript('js/myscript.js', 'text/javascript', true);
In my custom Joomla 3 extension I am using Bootstrap 2.3.2 for the front-end. I noticed that the default Joomla template protostar overwrites default Bootstrap classes which is not what I would like. Is there a way to load my stylesheet after the template's stylesheets so they overwrite any common rules may exist?
Try something like this,
This will add the css at your component calling time inside the component HTML section . Keep in mind it will not add the css at head section but for sure it will appear after the template css
$stylelink = '<link rel="stylesheet" href="../css/css.css" />';
$document = JFactory::getDocument();
$document->addCustomTag($stylelink);
Hope it works..
I need to display a CMS page inside my custom module's phtml file. Is there any way I can include it either through xml layout or via coding directly in phtml file? I know we can add a cms block but how can we add a cms page?
Try the below code in your phtml file
$page = Mage::getModel('cms/page')->load('home_page','identifier');
echo $page->getContent();
This code check if cms page is active then it will display page content
$page = Mage::getModel('cms/page')->load('top_offer','identifier');
echo $page->getIsActive()?$page->getContent():'';