Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Creating unique UL/drop down widths using superfi

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I am using the superfish menu for a four tabbed navigation on a site and I need to assign a unique id to each main tab / unordered list (ul) so that I can vary the width of the drop downs underneath them ... each tab's drop down needs to be a different width and I am having a really hard time doing it ... below is the template (menu.html) from the superfish folder in my theme (originally derived from elevate 2) and you'll notice I have added class="111" next to the ul but this obviously applies class="111" to all uls and I need unique identifies for these ul so I can target them specifically for the mods I need to make. Any help would be greatly appreciated.


<patTemplate:tmpl name="menu" whitespace="trim">
<script type="text/javascript" language="JavaScript" src="{TEMPLATE_HOME}/js/menu.js"></script>

{MENU_LIST}

</patTemplate:tmpl>

<patTemplate:tmpl name="menu_list" whitespace="trim">
<ul class="111"

<patTemplate:tmpl name="condition_LEVEL" type="condition" conditionvar="LEVEL" varscope="menu_list" whitespace="trim">
<patTemplate:sub condition="0">

</patTemplate:sub>
</patTemplate:tmpl>
>{MENU_ITEMS}</ul>
</patTemplate:tmpl>

<patTemplate:tmpl name="menu_item" whitespace="trim">
<li><patTemplate:tmpl name="condition_HAS_SUB_MENU_ITEMS" type="condition" conditionvar="HAS_SUB_MENU_ITEMS" varscope="menu_item" whitespace="trim">
<patTemplate:sub condition="1">
{LINK_OPEN}<span class="expanded">{CAPTION}</span>{LINK_CLOSE}
</patTemplate:sub>
<patTemplate:sub condition="__default">
{LINK_OPEN}{CAPTION}{LINK_CLOSE}
</patTemplate:sub>
</patTemplate:tmpl>{SUB_MENU_ITEMS}</li>
</patTemplate:tmpl>

  • ben frank's Avatar
  • ben frank
  • Previous Member
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Ben,

One suggestion is to enable element id in the module parameters for the extended menu.

This will give a unique id to the menu links and you can use the id to target and style the ul elements associated with those id's
This will result in you losing the active_menu id's.
Hope this helped.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Thanks, but I think I already have element id selected and it doesn't send a unique ID to those ULs ... there isn't a variable in the Superfish template. So you can target the links but not the sub UL. I have attached the image of the current parameters I have set.

Let me know if you can help me solve this and let the community know because having more control over the width of drop down under specific tabs seems like something many people would want to know how to do.
  • ben frank's Avatar
  • ben frank
  • Previous Member
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Ben,

The element ID adds an ID to the <a> elements but I can see how they are siblings to the ul's you want to target. I'll have a look at the code and get back to you on this.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Thanks Jason. I think many people will find this solution useful and it's important for me I get it fixed too. Appreciate it!
  • ben frank's Avatar
  • ben frank
  • Previous Member
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
I guess you reached an impasse with this? / Couldn't figure out a solution?
  • ben frank's Avatar
  • ben frank
  • Previous Member
  • 11 posts
  • Karma: 0
The administrator has disabled public write access.
Hey Ben,

Not quite an impasse as I haven't given up on it yet. Just haven't been able to prioritize it. I'll give it another go in the net couple of days. Feel free to nudge me here.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers