Actions

J2.5

How to add a span element to menu entries

From Joomla! Documentation

Revision as of 20:56, 12 February 2011 by Realityking (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Joomla 1.6 To add a span element to your menu items in Joomla 1.6, you have to override the layout for mod_menu. You can follow the general approach described in How to override the output from the Joomla! core.

You need to override the following layout from mod_menu:

  • defult_url.php
  • default_component.php

After copying the files into your template (see How to override the output from the Joomla! core for details) do the following:

In both these files look for the following statement:

<?php echo $linktype; ?>

It should occur three times in both files.

Replace each of these with:

<span><?php echo $linktype; ?></span>

And you're done.