Up

Custom Plus

I created this module to be able to add text to a component view and override the page title, meta description and meta keywords. I also added the functionality to add extra css and general code to the head section.

Normally there is no option in a menu item to add a description. With this module and a simple template override you can add introtext, footer text or text anywhere in the component and override the page meta tags and title.

parameters_thumb

To add a module position to your component view, you should first override the view. for example:

To override the listings view of Joomla Estate Agency, first move the file

/components/com_jea/views/properties/tmpl/default.php
To:
/templates/YOURTEMPLATE/html/com_jea/properties/default.php

This file now overrides the original. To insert a module position, add the following code

/***************************************
* Load module in the component*/

jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('htmlplus');
foreach($modules as $module)
{
echo JModuleHelper::renderModule($module);
}

 

Modules can now be assigned to the 'htmlplus' position

You can download this code in a text file here

You can change the getmodules line to another module position and use it again elsewhere in the file to load 2 modules (eg, intro-text at the top and footer text at the bottom). You only need to use this module once, any other positions added you can just use the standard custom html module.

Add your page title, new meta description and keywords and save it!

 

Newsletter Signup

Latest Posts

Google+ Timeline Feed for your Website Google+ Timeline Feed for your Website 2012-05-11 - I was asked earlier today to create a Google+ widget for a website to replace a twitt... More detail
Run Facebook Messenger on Windows Vista Run Facebook Messenger on Windows Vista 2012-04-19 - Facebook has just released it's new messenger for windows but it only runs on Windo... More detail
Translate K2store Product Attributes with Joomfish Translate K2store Product Attributes with Joomfish 2011-11-03 - If you have a K2store and your site is in multiple languages, you might have found th... More detail
French Translations for K2store French Translations for K2store 2011-11-02 - I have been working recently with the K2 component/plugin K2store. As a simple sho... More detail
How I Upgraded to Joomla 1.7 How I Upgraded to Joomla 1.7 2011-09-25 - Inspired by Robert Vining over at www.joomstew.com and the fact that I am building mo... More detail