Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8740841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:12:09+00:00 2026-06-13T11:12:09+00:00

What i’m trying to do is quite simple as concept, but i’m not that

  • 0

What i’m trying to do is quite simple as concept, but i’m not that good with php and the joomla framework.
Currently the home menu-item is generated like this:

<li class="item-101 current active">
  <a class="hide-text" href="#some-link">Home</a>
</li>

What i’d like to achieve is to insert an <i> element inside only the home menu-item, something like this:

<li class="item-101 current active">
  <a class="hide-text" href="#some-link"><i class="icon-home"></i>Home</a>
</li>

How can i achieve this? I’m using Joomla! 2.5 atm

I guess it’s possible do something like “if this menu-item is the home link then add this code inside the <a> tags” but i really don’t know how to do it, my php is not strong enough 😛

Note:
i’m doing this to achieve a simple home-icon instead of the litteral home menu-item.

As the classes syntax could suggest, i’m using the twitter bootstrap css-framework, but i’ve implemented the Icomoon font-set (as in joomla 3.0) instead of the tbs Glyph-icons sprites images.

Unfortunately, using font-based icons, text rules are applied to the icons also, and that is the reason i’m trying to insert a custom element inside the <a> tag, so that i can override the hide-text class hiding the home-icon.

Thanks for any suggestion!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:12:10+00:00Added an answer on June 13, 2026 at 11:12 am

    Have a look in the template file of the menu module.

    /modules/mod_menu/tmpl/default.php

    The template builds the HTML for the menu module.

    I just checked how it works in Joomla 2.5, and in the /modules/mod_menu/tmpl/default.php template the list is build. If you want to add to only the home link you’ll have to add a little bit of code. Something like this :

    if($item->home == '1'){ $item->title = '<i class="icon-home"></i>' . $item->title; };
    

    Insert this just under the foreach loop and have a go, it should look something like this :

    foreach ($list as $i => &$item) :
        // THIS ADDS THE <i> to only the HOME LINK
        if($item->home == '1'){ $item->title = '<i class="icon-home"></i>' . $item->title; }; 
    
        $class = 'item-'.$item->id;
        if ($item->id == $active_id) {
            $class .= ' current';
        }
    

    Good Luck 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Seemingly simple, but I cannot find anything relevant on the web. What is the
I need a function that will clean a strings' special characters. I do NOT
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.