We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. robjen
  2. Sherlock Holmes
  3. General Discussion
  4. Tuesday, 14 January 2014
  5.  Subscribe via email
Hello,

Have been trying to create menus in the footer modules - but all of them have the nav nav-stacked nav-pills styling.

I want plain and simple menus in the footer the same as you have in Joomlart templates.

The problem is that every time you select the menu option when creating a module the above styling is included.

So how do I create a menu in the footer module(s) that does not include nav nav-stacked nav-pills styling.

Any help would be appreciated.


Kind regards,
robjen
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Hi robjen,

It is somehow confuse to have the same name for spotlight and menu.

You can place the <jdoc /> above or below the spotlight up to your choice.

<jdoc:include type="t3bootstrap" name="footnav" menutype="footnav" />

<?php if ($this->checkSpotlight('footnav', 'footer-1, footer-2, footer-3, footer-4, footer-5, footer-6')) : ?>
<!-- FOOT NAVIGATION -->
<div class="container hidden-xs">
<?php $this->spotlight('footnav', 'footer-1, footer-2, footer-3, footer-4, footer-5, footer-6') ?>
</div>
<!-- //FOOT NAVIGATION -->
<?php endif ?>

Also, you can wrap the container div

<div class="container">
<jdoc:include type="t3bootstrap" name="footnav" menutype="footnav" />
</div>
.... spotlight goes here ..


Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Hi robjen,

You can overwrite the markup of mod_menu to remove the class.

Or you can use <jdoc:include type="t3bootstrap" name="'[menutype]" menutype="[menutype]" /> with the value of [menutype] is the menu type of footer menu you want.
Place this code in tpls/blocks/[block].php. [block] should be footer, i think.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hello Admin,

Thanks for your prompt reply.

Have managed to create a template override of the mod_menu by changing the class as shown below from:

FIRST SUGGESTION

<?php // The menu class is deprecated. Use nav instead. ?>
<ul class="nav menu<?php echo $class_sfx;?>"
<?php

to:

<?php // The menu class is deprecated. Use nav instead. ?>
<ul class="footernav menu<?php echo $class_sfx;?>"
<?php

SECOND SUGGESTION

I don't understand how to use the jdoc statement. The following section of code is used for the footer.php block.

<?php if ($this->checkSpotlight('footnav', 'footer-1, footer-2, footer-3, footer-4, footer-5, footer-6')) : ?>
<!-- FOOT NAVIGATION -->
<div class="container hidden-xs">
<?php $this->spotlight('footnav', 'footer-1, footer-2, footer-3, footer-4, footer-5, footer-6') ?>
</div>
<!-- //FOOT NAVIGATION -->
<?php endif ?>

How do I incorporate the jdoc line into this code.

I know the [menu type] is the name of the menu. For example, if my menu for the footer-1 position was named footnav, then the code you gave me would read as follows:

<jdoc:include type="t3bootstrap" name="footnav" menutype="footnav" />

So, the question is, how do I place the above jdoc line in the following code block.

<?php if ($this->checkSpotlight('footnav', 'footer-1, footer-2, footer-3, footer-4, footer-5, footer-6')) : ?>
<!-- FOOT NAVIGATION -->
<div class="container hidden-xs">
<?php $this->spotlight('footnav', 'footer-1, footer-2, footer-3, footer-4, footer-5, footer-6') ?>
</div>
<!-- //FOOT NAVIGATION -->
<?php endif ?>

Again, your help would be most welcome.


Kind regards,
robjen
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Stefan Gofferje,

You should check for those overwrites in plugins/system/t3 folder.
This will be apply in T3 v2.0.x and T3 Bs3 Blank.

Regards
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hello Admin,

Thanks for your help. Will give that a try.


Kind regards,
robjen
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
If I may join in here... I have exactly the same issue. I have checked /modules/mod_menu/tmpl/default.php and that class "nav-stacked" doesn't seem to be applied in there. In fact, a grep -R nav-stacked * in the mod_menu folder didn't find anything at all.

I just want to add a horizontal menu into footer-2 but I can't seem to be able to figure that out. I'd prefer to do it through the backend rather than through hardcoding in the template because I'm trying to create a template that's more flexible and which I can re-use for modernizing some of my other websites.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
Well, I found an easier way than hacking the module...

/plugins/system/t3/base-bs3/html/mod_menu reveals that piece of code:

Edit:
Seems like code can't be included in this comment. I just get mess... Check lines 13 and 15 of the file.

So - setiing <space>navbar-nav as Menu Class Suffix solves the problems without any code-hacking or hardcoding.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
We surely should not be trying to "get around" this. There must be a simple way to not have T3 re-write the class when you are stating the style="none". Or am I missing something?

<jdoc:include type="modules" name="mymenu" style="none" />
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 8
Accepted Answer Pending Moderation
0
Votes
Undo
Simplest solution I can think of at present, with full control and no extra classes stuck in there. Add a folder "mod_menu" in "templates/t3_bs3_blank/html/". Copy the file "plugins/system/t3/base-bs3/html/mod_menu/default.php" into this folder and rename to something you prefer e.g. plain.php.

When setting up the menu in Module Manager, select the new option under the popup "Alternative Layout" under "Advanced" tab.

Now you can edit this to remove the class additions and set it up to your liking.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 9
Accepted Answer Pending Moderation
0
Votes
Undo
Mehdi, perhaps you misunderstand Stefan's answer; it is not a "work-around" it is more of a "work-WITH"...

You simply need to set the MENU class suffix within the menu module ("advanced" parameters).
The T3 code looks to see if you've defined "nav-navbar" as the Menu Class Suffix, and if so, does not add the "nav-stacked" class, like so:
<?php $is_navbar = strpos(' ' . $class_sfx . ' ', ' navbar-nav ') !== false; ?>
<ul class="nav <?php echo ($is_navbar ? '' : ' nav-pills nav-stacked '), $class_sfx;?>">


MUCH simpler than changing any code, and also allows you to set this at the module level, instead of at the position level.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 10
Accepted Answer Pending Moderation
0
Votes
Undo
Ryan, thanks for clarifying.

However, there is a typo in your explanation. Thank you for also including the code, because that's how I picked up the typo.
You should have said " The T3 code looks to see if you've defined "navbar-nav" as the Menu Class Suffix. " A minor transposition, but important nevertheless. ;)

Now all I need to do is remove the references to "Bootstrap" & "Font Awesome" so that the menu stands alone.
  Fitzroy North VIC, Australia
Visit 
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 11
Accepted Answer Pending Moderation
0
Votes
Undo
Hi there !

I have the same issue and putting a class suffix in the module doesn't replace the nav-pills nav-stacked class...

It seems that this code part doesn't work properly :

$is_navbar = strpos(' ' . $class_sfx . ' ', ' navbar-nav ') !== false;
?>
<ul class="nav <?php echo ($is_navbar ? '' : ' nav-pills nav-stacked '), $class_sfx;?>">



Bugtracker ? ^^
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 12
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.