Thank you very much!
Got a reply from Lefteris Kavadas,
"Hi. The menu always override the metadata. That's why those options are there. You can leave them blank in the menu settings or create menu link for single categories also instead of having one menu link for all."
I'm linking two categories, it will be so nice to have separate meta data and title for Menu Item and K2 Categories and K2 Items.
I came up with a idea, please check if it would work;
I'm trying to run the piece of code which fetch the meta data and title from Menu Item only one with condition like,
xeont
Topic Author
13 years 1 month ago #119028
No Luck..
works only for the first time.
if you click menu item again, meta data is missing
shouldn't be using a session anyway. Google doesn't recommending it.
there must be a better solution. which i don't know
Krikor Boghossian
13 years 1 month ago #119029
Hello xeont,
I am still not sure what you want to accomplish with this code snippet. If you are having menu item setting these will override the K2 category settings. So you can either create one menu per category or use Joomla!'s API
docs.joomla.org/JDocument/setMetaData for a more custom solution. I would however recommend having one category per menu item.
xeont
Topic Author
13 years 1 month ago #119030
:P
I didddddd itttttt!!!!!!
After hours of trying, trying and trying finally i can have separate Meta Data for everything with Multiple Categories linking to one Menu Item.
it wasn't hard it as i thought.
What i did was
first fetch the Metadata from Menu Item and set the Metadata for the Menu Item.
Then i inserted the code for fetching Metadata from categories into category "case" function and set the Metadata for categories!
Now working like a charm!
When you click the Menu Item > It set the metadata for Menu Item because it NOT a Case=!Categories
When you click categories > It set the Metadata for Category because NOW Case=Categories
Admins you could have told me this before :P
Just changing the places of code, this could be easily done
Please correct me if i'm wrong!
I'll post the code here