- Posts: 3
COMMUNITY FORUM
Custom item in MY Page under K2 login module
- Alin Danila
-
Topic Author
- Offline
- New Member
Less
More
14 years 5 months ago #91181
by Alin Danila
Custom item in MY Page under K2 login module was created by Alin Danila
Hi,For my website i use mod_k2_login.After authentication in that module i have:* My Page* My AccountI want a specific module (mod_mainmenu ->User Menu, acces level: registered) to show up (on right position) in My Page and My account pages.The only way i figured how to do this is to setup that module (User Menu) with Menu Assignment -> All but this setting will display the user menu under all pages and menus across the site.I want to display this user menu only in "My Page" and "My Account" pages (in right position) accesed by logged in user.I tried to edit "userblock.php" file located inside mod_k2_login/tmpl directory.I found the lines that controls the "My page" and "My Account" links.On "My Page" line i have:<a href="<?php echo JRoute::_(K2HelperRoute::getUserRoute($user->id)); ?>"><?php echo JText::_('My page'); ?></a>on "My Account":<a href="<?php echo JRoute::_('index.php?option=com_user&view=user&task=edit'); ?>"><?php echo JText::_('My account'); ?></a>Ok, i want to call into this links that "User menu" module, i assume that i need to "call" it by it's id (id=17). How can i achieve this?Thanks in advance!
Please Log in or Create an account to join the conversation.
- Alin Danila
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 3
14 years 4 months ago #91182
by Alin Danila
Replied by Alin Danila on topic Custom item in MY Page under K2 login module
Any advice?
Please Log in or Create an account to join the conversation.
- Shapes
-
- Offline
- Junior Member
Less
More
- Posts: 30
14 years 2 months ago #91183
by Shapes
Replied by Shapes on topic Custom item in MY Page under K2 login module
Hello Alin,
I need to do the same, I think, adding "my page" link to my main menu without using mod_K2login...
Did you manage to get this done ?
How ?
Hoping for answers,
Best regards,
David aka Shapes
I need to do the same, I think, adding "my page" link to my main menu without using mod_K2login...
Did you manage to get this done ?
How ?
Hoping for answers,
Best regards,
David aka Shapes
Please Log in or Create an account to join the conversation.
- matthew turner
-
- Offline
- Senior Member
Less
More
- Posts: 66
14 years 2 months ago #91184
by matthew turner
Replied by matthew turner on topic Custom item in MY Page under K2 login module
Hi,
I use the fantastic MetaMod Pro for calling modules in situations like this - can also be used to alter the module when it is called ie can set module to change title or module contents depending on the display rules you set (has a helpful built in tool that gives working example code specific to the page it is displayed on)....link here : www.metamodpro.com/
They have "Recipes" for other joomla components - Virtuemart, Joomfish etc...
Can also switch modules on or off using keywords in text or meta keywords/description, logged in or out, etc
Can include HTML content or write your own PHP rules (if..else)
Look in their forum for more K2 specific recipes - hope this helps - I will add some recipe suggestions here if you decide to use metamod pro...
Regards
Mat
I use the fantastic MetaMod Pro for calling modules in situations like this - can also be used to alter the module when it is called ie can set module to change title or module contents depending on the display rules you set (has a helpful built in tool that gives working example code specific to the page it is displayed on)....link here : www.metamodpro.com/
They have "Recipes" for other joomla components - Virtuemart, Joomfish etc...
Can also switch modules on or off using keywords in text or meta keywords/description, logged in or out, etc
Can include HTML content or write your own PHP rules (if..else)
Look in their forum for more K2 specific recipes - hope this helps - I will add some recipe suggestions here if you decide to use metamod pro...
Regards
Mat
Please Log in or Create an account to join the conversation.