change php code but apply to specific menu

  • Posts: 846
  • Thank you received: 92
11 years 4 months ago #116052

Hi
my questoin is not relative too joomla but since sometime in the Forum , the way to go is change the code . But doing this ll change all the behaviour of all instance of modules/component ( i think plug in can't be instancied only enable and use ) .

so
1- which code have to be use to create a swicht and say for example when i click on the menu item link (Id1) ; the page code ( ID2) that ll be load ll be different ?

2-Is there a way to have second instance of the same plugin (code ll be custom) in joomla ?

3-override is the way to go to have a new "instance" but only one for a specific template !!!

Does it make sense to do that ? Does anyone already do that ?



thank's

Last edit: 11 years 4 months ago by lionel75.

Please Log in or Create an account to join the conversation.

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 4 months ago #116111

Hi,

1.

if($_GET['Itemid']==1){
//code for menu with id 1
}elseif($_GET['Itemid']==2){
//code for menu with id 2
}

2. No. Joomla plugins don't handle instances.

3. Joomla plugins are usually only one file. There is little need for override in such case. You can directly add your code in it.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum