$module->content returning <li> and other tags

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
marcingalazka
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Apr 12, 2018 6:44 am

$module->content returning <li> and other tags

Post by marcingalazka » Thu Apr 12, 2018 6:51 am

Dear Joomla Colleagues,

I am working on basic template and got stuck with chrome.

Details:
I would like to use JQuery tabs to display my menu titles (tabs names) and menu content. However, when trying to use $module->content in chrome in modules.php with simplest code:

Code: Select all

 echo $module->content; 
I am receiving string with various additional tags, as below:

Code: Select all

<li class="item-101" default current active>
<a href="here link">Content</a>
</li>
My question is:
Is there easy trick for getting array of titles/content without additional tags?

Thank you,
Marcin

SharkyKZ
Joomla! Guru
Joomla! Guru
Posts: 998
Joined: Fri Jul 05, 2013 10:35 am
Location: Unknown

Re: $module->content returning <li> and other tags

Post by SharkyKZ » Thu Apr 12, 2018 7:44 am

You are getting the module content, as is expected. For what you're trying to accomplish, instead of editing module chromes you should be editing mod_menu template.

marcingalazka
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Apr 12, 2018 6:44 am

Re: $module->content returning <li> and other tags

Post by marcingalazka » Thu Apr 12, 2018 12:26 pm

Thank you for quick answer, I think I am closer to the solution :)


Post Reply

Return to “Templates for Joomla! 3.x”