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

  • SEARCH
  • Home
  • 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 9219959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:14:11+00:00 2026-06-18T03:14:11+00:00

I have an issue in Joomla where I have a module that creates a

  • 0

I have an issue in Joomla where I have a module that creates a select dropdown list from a menu.

Works great if I have just 1 dropdown on a page – if I have 2 dropdowns by creating another instance of the module pulling from another menu (i.e. dropdown1 & dropdown2) the page crashes.

I was wondering if it is to do with the following code in my modules default.php tmpl file:

<?php
// No direct access.
defined('_JEXEC') or die;
?>
<form name="SelMenFrm">
<?php if($params->get('showLabel') == 1) echo $params->get('selectLabel')."&nbsp;"; ?>
<select name="SelMenSel" class="<?php echo $class_sfx;?>" onchange="javascript:location.href=document.SelMenFrm.SelMenSel.options[document.SelMenFrm.SelMenSel.selectedIndex].value;">
<option><?php echo $params->get('topText');?></option>
<?php
foreach ($list as $i => &$item) :
    // Determine if item shoud be set as selected
    $selected = "";
    if (($item->home == 0) && ($item->id == $active_id)) $selected = "selected=\"selected\"";
    // Set indent
    if ($item->level == 1) $indent = "";
    if ($item->level == 2) $indent = "&nbsp;-&nbsp;";
    if ($item->level == 3) $indent = "&nbsp;-&nbsp;&nbsp;-&nbsp;";
    if ($item->level == 4) $indent = "&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;";
    if ($item->level == 5) $indent = "&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;";
    if ($item->level == 6) $indent = "&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;&nbsp;-&nbsp;";
    echo "<option ".$selected."value=\"".$item->flink."\">".$indent.$item->title."</option>";
endforeach;
?>
</select></form>

Any ideas/help would be really appreciated 😉

Thanks

  • 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-18T03:14:13+00:00Added an answer on June 18, 2026 at 3:14 am
    $indent = str_repeat("&nbsp;",($item->level>=1?($item->level-1):0));
    

    what about that?

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

Sidebar

Related Questions

I have a from that outputs a list of variables to an encoded URL
I am having a stupid issue with a Joomla Menu Module called Maxi Menu.
So I have a joomla! page that is partly generated by functions based on
I have just updated a site to Joomla 2.5 and have an issue I
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have an issue of alphabetically sorting the contacts picked from the address book
I have an issue while getting the file name with out extension from a
I have an issue. I am getting data from a MySQL database, and make
I have been called in to fix the performance of a Joomla site that
I have a Joomla 1.5 component that uses a call to the editor class

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.