Keyword

Get ITEM TITLE

  • sortby
  • sortby's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149396 by sortby
Get ITEM TITLE was created by sortby
Hello,
I need to call the "itemtitle" into a custom php (chronoforms) that is loaded inside a K2 item

get('itemTitle')

I need to display the item title into a form.
I have used different solutions...but seems nothing is working.....


Thanks to all!
Frank

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

  • Rupert Griffiths
  • Rupert Griffiths's Avatar
  • Offline
  • Junior Member
More
8 years 10 months ago #149399 by Rupert Griffiths
Replied by Rupert Griffiths on topic Get ITEM TITLE
Not really the solution you want but I use fox contact forms built into my K2 items. The form by default includes a link to the page it was filled in from, so the receiver of the form can tell exactly what item the user was inquiring about. Example:
www.siampropertydirect.com/villa-j-is-located-in-choeng-mon-koh-samui.html

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

  • sortby
  • sortby's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149406 by sortby
Replied by sortby on topic Get ITEM TITLE
Hello Rupert thanks for your reply, you're right is not my situation because I use another component to build forms.
I'm looking for a direct access to itemtitle (possibly without query) a direct access like "Joomla:: "

Any idea how to achieve this?
thanks

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #149428 by Krikor Boghossian
Replied by Krikor Boghossian on topic Get ITEM TITLE
Hello,

Without querying the db there is no way of retrieving data in the current version of K2.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • sortby
  • sortby's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149438 by sortby
Replied by sortby on topic Get ITEM TITLE
many thanks.
But with data layer in v3 it will be possible?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #149441 by Krikor Boghossian
Replied by Krikor Boghossian on topic Get ITEM TITLE
Sure! You can try it in a dev site (not on a production) and play around with it.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • sortby
  • sortby's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149450 by sortby
Replied by sortby on topic Get ITEM TITLE
Nice,
you mean I can integrate this file....mhhhh.....interesting......could you please tell me the short way to get itemtile.
Many thanks!

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

More
8 years 10 months ago #149453 by Joe Campbell
Replied by Joe Campbell on topic Get ITEM TITLE
Hello sortby,

Try using the following solution:
www.nonumber.nl/forum/contenttemplater/11331

I hope this helps,

Joe Campbell

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

More
8 years 6 months ago #152609 by Usop Wilcha
Replied by Usop Wilcha on topic Get ITEM TITLE

Joe Campbell wrote: Hello sortby,

Try using the following solution:
www.nonumber.nl/forum/contenttemplater/11331

I hope this helps,

Joe Campbell


Hi Joe

Here's my scenario,

I'm building a K2 based catalog, and on every item there's a booking form placed for the visitor to email back the site admin
At the booking form field, I've created a "Subject" field that visitor should write the K2 items page title then, as a product name
So, I was looking if there's any function of "self titled" for the "subject" field, when i found this thread ..

As i was currently try to understanding the solution here
I was stuck and confused here, what should i put on the subject field?

{source}<?php echo $article->title; ?>{/source}

OR

{article current}{title}{/article}

These lines won't work for me, am i doing something wrong here?

Please advise

Thanks!

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

More
8 years 6 months ago #152611 by Joe Campbell
Replied by Joe Campbell on topic Get ITEM TITLE
Hello @DannyOHara,

Here are two solutions that you can utilize to produce the current K2 title:

{source 0}<?php echo $this->item->title; ?>{/source}

{article k2:current}{title}{/article}

Note: you may want/need to include "0" in your source syntax:
www.nonumber.nl/extensions/sourcerer#not-using-a-wysiwyg-editor

Please let me know which solution you utilize :)

Regards,

Joe

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


Powered by Kunena Forum