-
AuthorPosts
-
June 2, 2010 at 5:02 pm #151534
Hi! I have been using JAPurity template for some time but now want to try JAPurity ii. My only problem is how to add my own type of menu. I tried to find my way through the code but I am afraid I am stuck. :(( When using JA Purity I had only tweak a bit three files in mysite/modules/mod_mainmenu
mod_maimenu.xml
<param name=”menu_style” type=”list” default=”list” label=”Menu Style” description=”The menu style”>
…
<option value=”my_way”>my-way</option>
</param>helper.php
function render(&$params, $callback)
{
switch ( $params->get( ‘menu_style’, ‘list’ ) )
{
…
case ‘my_way’:
// Include the legacy library file
require_once(dirname(__FILE__).DS.’legacy.php’);
mosShowMWMenu($params);
break;
…}
}legacy.php
function mosShowMWMenu(& $params, $style = 0)…
The last is my own function which produces rather a fancy three level menu with balloons. It is rather straightforward simple thing but very effective for my purposes and I like it very much (maybe because I made it myself :))
Can I use this function in JA Purity ii? I think so but where am I to put it? As far as I can see JA Purity ii don’t use functions from Joomla package itself (that is from mysite/modules/mod_mainmenu) but rather from the template. Maybe I can add my own type of menu in addition to MegaMenu, SplitMenu etc?———————————–
I put myway.css into ja_purity_ii/css/menu folder and added myway.class.php into Ja_putity_ii/libs/menu.
As for myway.class.php I took the file moo.class.php, changed everywhere “moo” to “myway”, paste into it all functions from base.class.php and made them all but one empty, replaced function __constructed to my darling function I mentioned above and I have added <option value=”myway”>My Way Menu</option> intotemplateDetails.xml… but got this fatal error: Call to undefined function myway_links() in Z:homejoomlawwwsite3templatesja_purity_iilibsmenumyway.class.php on line 27 even though I do have the function myway_links in the file myway.class.php… I do the things on localhost so I can’t show anything… but please give me some clue how the parent:: works in this template and I think I’ll be able to find my way though the code!
————————————-
Well, two days of fruitless attempts and I gave in. I have added my own menu via good old legacy. But I think it would be just nice if there were a clear way to add customer types of menu to the standard list of menu types in this impressive template… -
AuthorPosts
This topic contains 1 reply, has 1 voice, and was last updated by annie 14 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum