Hi,
I want to capture content title in a form so that I can understand for which content the form is sent. I can capture the url by the following
return $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
but how can I capture the title of the content item? The form will be inside the content item via a mambot.
Or if you know any form component that can do this easily, that'll also help.
Thanks in advance...
Serkan
How to capture content title?
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: How to capture content title?
serkany wrote:The form will be inside the content item via a mambot.
i think you yurself provided the anwer. you can get the bot to pick up the title and keep it in the form as input type=hidden.

Re: How to capture content title?
:) Yes but how can I pick up the title, that's my problem...What's the variable for that?
I'm trying to use RSForm and it has a bot to display the form in the content item. I put the following code
global $mainframe;
$_POST['form']['tur'] = $mainframe->_head['title'];
to be processed after submit but it gives back the title of the overall site not the content title.
Any idea how to solve this?
Regards,
Serkan
I'm trying to use RSForm and it has a bot to display the form in the content item. I put the following code
global $mainframe;
$_POST['form']['tur'] = $mainframe->_head['title'];
to be processed after submit but it gives back the title of the overall site not the content title.
Any idea how to solve this?
Regards,
Serkan
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: How to capture content title?
why not can use the OnPrepare Content event ( or somethng like that name, don't know exactly the name ) in your bot to get the contents and then search for content titles and then you will be able to do someting with it. There a family of them OnAfterContent, OnBefore Content.
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: How to capture content title?
serkany wrote:Yes but how can I pick up the title, that's my problem...What's the variable for that?
i do not know of any variable used for the title, but someone experienced in this area may shout at this stage that there is one hopefully. i think the title is just put out as a