Page 1 of 1
How to capture content title?
Posted: Mon Sep 03, 2007 4:05 pm
by serkany
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
Re: How to capture content title?
Posted: Mon Sep 03, 2007 7:28 pm
by Tonie
Moving to coding 101 Q/A
Re: How to capture content title?
Posted: Tue Sep 11, 2007 3:18 am
by jalil
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?
Posted: Tue Sep 11, 2007 2:38 pm
by serkany
:) 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
Re: How to capture content title?
Posted: Wed Sep 12, 2007 12:10 am
by jalil
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.
Re: How to capture content title?
Posted: Wed Sep 12, 2007 12:24 am
by jalil
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