Minifrontpage Tips
Written by Erwin Schro   
Tuesday, 20 May 2008

minifrontpage module logoI 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.

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" />
    <param name="custom_link_text" type="text" default="More Hot News" label="Text for Custom Link URL" description="Link text for the URL above" />

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', '') );
    $custom_link_text = trim( $params->get('custom_link_text', '+ More Articles') );

 

Then, add these line of code right before the closing '}',

    echo '<div style="clear:both;"></div>';
    $custom_url_sefed = sefRelToAbs($custom_link_url);
   
    // you can change the URL text alignment below - left right or center
    echo '<div style="border-top: 1px solid #CCCCCC;text-align:right;">';
    echo '<a href='.$custom_url_sefed.' class="minifp-full-link">'.$custom_link_text.'</a>';
    echo '</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 >
joomla template custom work
Check out my previous template custom work based on TemplatePlazza commercial template.
 + Video Plazza
 + DarkMania Plazza
 + FunkyNews Plazza

Latest Template News

Template NewsJoomDKBlog - Our 6th Free Joomla Template

Sunday, 24 February 2008

JoomDKBlog is our 6th free joomla template porting experiment which is based on DK Blog CSS template from Free CSS Templates. This template is release under a Creative Commons Attribution 2.5...
+ Full Story

Other Template

Contact Me

Who's Online

We have 1 guest online