| Minifrontpage Tips |
| Written by Erwin Schro | |
| Tuesday, 20 May 2008 | |
|
Today, I will give you a short tutorial on how to add a custom link that you might need to refer to another pages or articles not listed in article category of minifp. This link will sit on the bottom of the module. First, we need to add some module parameter for this added custom link. Module parameter is supplieby the module xml file, so open your mod_minifrontpage.xml file. It's under the /YOUR-JOOMLA-ROOT/modules/ for J1.0.x and /ROOT/modules/mod_minifrontpage/ for J1.5. Add these line of code right below the last param tag,
<param
name="custom_link_url" type="text" default="" label="Add Custom Link
URL" description="Add your custom link URL in relative format, example:
index.php?option=com_content&task=blogsection&id=5&Itemid=88"
/> Save it. Then, open your mod_minifrontpage.php file (J! 1.0.x), add this just below the groups of the module parameter's get function,
$custom_link_url = trim( $params->get('custom_link_url', '') );
Then, add these line of code right before the closing '}',
echo '<div style="clear:both;"></div>'; Save it. Reload your page and start to fill the parameter. Note: you should fill the custom link URL as a relative path to your joomla site. It means you should fill with url in this form index.php?option-com_contents... Still not working smoothly?...start typing on the chat window on the right. |
| Next > |
|---|
I think you already know or even use this module. It was good module, it is. Was on top 5 rated on JED (Joomla Extensions Directory) for couple of weeks if I'm not wrong.
