• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Insert a K2 title in hidden file

Insert a K2 title in hidden file 10 years 11 months ago #27473

  • Šorgo
  • Šorgo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I need to know from how article in K2 is form submitted , for this in the hidden file I colect the title with tis code:

//<code>
$doc = JFactory::getDocument();
return $doc->getTitle();
//</code>

The problem is that this code is get the title of menu instead a real item title. When the item is not directly connected to menu (category listing)I take in resultat name of category (from menu) instead of article title.

Does anyone know how to take the article from k2 his title?

Thank you.

Hvala.
The administrator has disabled public write access.

Insert a K2 title in hidden file 10 years 8 months ago #28619

I'm also struggling with this and would appreciate an answer.

Thanks

Andrew
The administrator has disabled public write access.

Insert a K2 title in hidden file 10 years 7 months ago #28880

  • lthompson
  • lthompson's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 1
Try this:

//<code>
$db = JFactory::getDBO();
$articleid = JRequest::getInt('id');
$db->setQuery('SELECT title FROM #__k2_items WHERE id='.$articleid);
$myid=$db->loadResult();
return $db->loadResult();
//</code>
The administrator has disabled public write access.
The following user(s) said Thank You: Roberts
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!