is it possible to insert a link into the module title?

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Fri Jul 08, 2011 12:32 am
i want to insert a category blog link to the module title of the News Show Pro GK4. is it possible guys?

Any ideas?
User avatar
Fresh Boarder

GK User
Fri Jul 08, 2011 6:24 am
nevermind i already did it :laugh:
User avatar
Fresh Boarder

teitbite
Fri Jul 08, 2011 12:25 pm
Hi

Can I ask what was the solution ? I would use a mod_custom with this title before.
User avatar
Moderator

GK User
Fri Jul 15, 2011 12:44 am
i manually hack the codes into the joomla modules. this is how it works.

there are two files needed to be changed to make this possible. the one is the module.php that is located into your templates/yourtemplate/html/modules.php and the other one is the module layout of your template(probably the index.php in your template folder) first you need to edit the module.php you should just add some function just like this.
Code: Select all
function modChrome_xhtmlLinkedTitle ($module, &$params, &$attribs)

{
$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
$headerLevel = "1";

if (!empty ($module->content)) : ?>
<div class="moduletable<?php echo htmlspecialchars($params->get('moduleclass_sfx')); ?>">

<?php if ($module->showtitle) : ?>
<?php if($module->id == 1) : ?>
<h<?php echo $headerLevel; ?>><a href="#link1"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php elseif($module->id == 2) : ?>
<h<?php echo $headerLevel; ?>><a href="#link2"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php elseif($module->id == 3) : ?>
<h<?php echo $headerLevel; ?>><a href="#link3"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php elseif($module->id == 4) : ?>
<h<?php echo $headerLevel; ?>><a href="#link4"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php elseif($module->id == 5) : ?>
<h<?php echo $headerLevel; ?>><a href="#link5"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php elseif($module->id == 6) : ?>
<h<?php echo $headerLevel; ?>><a href="#link6"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php elseif($module->id == 7) : ?>
<h<?php echo $headerLevel; ?>><a href="#link7"><?php echo $module->title; ?></a></h<?php echo $headerLevel; ?>>
<?php else : ?>
<h<?php echo $headerLevel; ?>><?php echo $module->title; ?></h<?php echo $headerLevel; ?>>
<?php endif; ?>
<?php endif; ?>

}

Please note that you can just choose what module title you want to be a link just by changing its module ID. then the last step is by going into your index.php then go to the module position that you want the module title to be a link then change the style parameter to "xhtmlLinkedTitle" the code will look like this

<jdoc:include type="modules" name="user3" style="xhtmlLinkedTitle" />

thats the only method i know on how to make a link into the module title
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 12:35 pm
Hi Alex,
thank's a lot for your guide.
I do the first step. but I can't do the secondo because in my index.php in root i don't have nothing about my module.

Can you help me please?
Thanks thanks thanks

Matteo
User avatar
Fresh Boarder


cron