T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Guest
  2. Motivator Hole-in-One Smile Seeker
  3. General Discussion
  4. Sunday, 25 May 2014
  5.  Subscribe via email
Hello there,

Is it possible to override t3v3 mega menu html output from template?

There is a function like:



public function onT3Megamenu(&$menutype, &$config, &$levels)
{

}



in templateHook.php file. But It cann't modify html.

Basically I need to add some attributes on <a> tag like: data-title, data-wrapper-class. Is it possible?

thank you :)
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
This is a great request and I've just applied to githup. You can find the commit here:

https://github.com/t3framework/t3/commit/2cc46dbc70cb6ab640de74942628ccc3139452e4

To override a function defined in T3MenuMegamenuTpl class, you need define a function with name T3MenuMegamenuTpl_[name] in file templates/[your
template]/html/megamenu.php
. Example, you need add some attribute into <a> tag, you may need override function item_url, you define the overridden function in templates/[your
template]/html/megamenu.php



function T3MenuMegamenuTpl_item_url($vars) {
// you code here
return $link;
}
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
  • Page :
  • 1


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