Keyword

Get Extra Field values to use it in main Joomla index.php template. ??

  • Zan Draa
  • Zan Draa's Avatar Topic Author
  • Offline
  • New Member
More
13 years 9 months ago #91425 by Zan Draa
Hi Everybody.Is it possible to get Extra Field values to use it in main Joomla index.php template. ??something like you can use in template:$mydoc =& JFactory::getDocument();$mytitle = $mydoc->getTitle();Regards

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

More
13 years 9 months ago #91426 by william white
You can get the extra fields while in a k2 template override like this
You should be able to address them from the template file, but you may have to dig a little deeper!
Do you have an example of the layout you are trying to acheive?

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

  • Zan Draa
  • Zan Draa's Avatar Topic Author
  • Offline
  • New Member
More
13 years 9 months ago #91427 by Zan Draa
What I wanted to do was:
1. For K2 item I'm setting extra filed: background -> for example path to image (different for different K2 articles)
2. When K2 item is loaded in main page I want to get variable 'background' to load this image to flash content using flash vars in main joomla template where flash content is embed.

I have solved this problem.
Now I'm using sessions to keep extra fields values in K2 item (some changes to write session values in com_k2/templates/default/item.php), then in my joomla template I just read session variables.
Probably not the best solution but it works.

Regards

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


Powered by Kunena Forum