-
AuthorPosts
-
October 17, 2013 at 8:59 pm #191485
Hi All,
The current version of the T3 framework renders Megamenu only in the fixed nav element “t3-mainnav”. The problem is that we cannot create multiple Megamenus for different pages.
How to render Megamenu inside a custom module? In that case I could create multiple Megamenus and assign them to different pages as needed.
What is the right code to place in the module’s default.php to do this? I tried
<?php
$t3app = T3::getApp($this);
$t3app->megamenu($t3app->getParam('mm_type', 'mainmenu'));
?>It works, but I am not sure if I need the whole T3 framework to load before. What is the minimum required T3 intialization code to load Megamenu inside a module?
Thanks!
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
October 18, 2013 at 4:09 am #509406Hi andyg,
The framework will be automatically load when you run a T3 template.
When you call T3::getApp, just make sure you have call it after the template index.php loaded.
Or you need to pass a Document Object (it is somehow complicated).
You do not have to pass any parameter.Anyway, it is working, so you can just test your site to make sure it is ok.
Regards
October 18, 2013 at 6:39 am #509417<em>@Wall Crasher 394138 wrote:</em><blockquote>Hi andyg,
The framework will be automatically load when you run a T3 template.
When you call T3::getApp, just make sure you have call it after the template index.php loaded.
Or you need to pass a Document Object (it is somehow complicated).
You do not have to pass any parameter.Anyway, it is working, so you can just test your site to make sure it is ok.
Regards</blockquote>
Thanks. Do I need to unset the class instance at the end?Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
October 21, 2013 at 3:00 am #509624No, you do not have to do it.
T3::getApp will return the factory instance.November 22, 2013 at 3:46 pm #513170<em>@andyg 394102 wrote:</em><blockquote>Hi All,
The current version of the T3 framework renders Megamenu only in the fixed nav element “t3-mainnav”. The problem is that we cannot create multiple Megamenus for different pages.
How to render Megamenu inside a custom module? In that case I could create multiple Megamenus and assign them to different pages as needed.
What is the right code to place in the module’s default.php to do this? I tried
<?php
$t3app = T3::getApp($this);
$t3app->megamenu($t3app->getParam('mm_type', 'mainmenu'));
?>It works, but I am not sure if I need the whole T3 framework to load before. What is the minimum required T3 intialization code to load Megamenu inside a module?
Thanks!</blockquote>
Hi. Turned cause megamenyu through the module and bring megamenyu several different menu items? Give more information about the implementation. Thank you) I would like that this could be done at the template level course. It would be very comfortable and cool. The desired functionality.
November 22, 2013 at 3:47 pm #513171<em>@andyg 394102 wrote:</em><blockquote>Hi All,
The current version of the T3 framework renders Megamenu only in the fixed nav element “t3-mainnav”. The problem is that we cannot create multiple Megamenus for different pages.
How to render Megamenu inside a custom module? In that case I could create multiple Megamenus and assign them to different pages as needed.
What is the right code to place in the module’s default.php to do this? I tried
<?php
$t3app = T3::getApp($this);
$t3app->megamenu($t3app->getParam('mm_type', 'mainmenu'));
?>Hey. Turned cause megamenyu through the module and bring megamenyu several different menu items? Give more information about the implementation. Thank you) I would like that this could be done at the template level course. It would be very comfortable and cool. The desired functionality.
It works, but I am not sure if I need the whole T3 framework to load before. What is the minimum required T3 intialization code to load Megamenu inside a module?Thanks!</blockquote>
Hi. Turned cause megamenyu through the module and bring megamenyu several different menu items? Give more information about the implementation. Thank you) I would like that this could be done at the template level course. It would be very comfortable and cool. The desired functionality.
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
November 25, 2013 at 5:54 am #513349Hi olejenya,
If you want a module that you will need to call the function as above in module.
<?php
$t3app = T3::getApp();
$t3app->megamenu('the_menu_type');
?>if you want to show the megamenu at in those tplblocks code (in the template), you just need to show this markup
<jdoc:include type="megamenu" name="the_menu_type" menutype="the_menu_type" />
And yes, you still can use the markup above to render the module.
This require some knowledge about PHP and Joomla to implement a module.
Though, it is easy to do. And you can hire a developer to help you.Regards
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by Wall Crasher 11 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum