Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Is there any way to use article tags outside of article context?
This would repeat your form for each article returned by txp:article. I think you need to use adi_gps plugin and create your link to the contact form with the title in it. So in your article you’d have:
<a href="<txp:site_url/>contact-form?article-title=<txp:title />">Link to Contact Form</a>
and your form could use
<li><txp:zem_contact_text label="Subject:" default="<txp:adi_gps name="article-title" />" name="tema" break="" required="0" /></li>
Warning: not tested.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Is there any way to use article tags outside of article context?
MattD wrote:
How about using adi_gps and sending the Article Title as a url parameter?
I think the problem is that this
default=”<txp:article><txp:title /></txp:article>” or default=”<txp:title />”
is not executing in any way, it just displays what I put there, no mather what I place there.
Offline
Re: Is there any way to use article tags outside of article context?
default=”<txp:adi_gps name=“article-title” />”
what would that return, url like my-article-title ? Doesn’t look pretty for subject, I’ll leave that as the last option if nothing else comes out.
Offline
Re: Is there any way to use article tags outside of article context?
Why is this code not executing:
default=”<txp:php>$subject = ‘test’; echo $subject;</txp:php>”;
that is my problem I think…
Offline
Re: Is there any way to use article tags outside of article context?
Try with single quotes when you use a txp-tag as an attribute of another txp-tag (=process this tag and put the result here), e.g.:
<txp:zem_contact_text label="Subject:" default='<txp:article><txp:title /></txp:article>' name="tema" break="" required="0" />
You don’t need single quotes in HTML tags, only when using txp tags as attributes of other txp-tags.
Otherwise, both the methods proposed above seem promising:
- a hidden inline div within your article page that is displayed in a modal box using a modal box script. Many modal box plugin libraries come equipped with that use case built in, e.g. thickbox (see “show hidden model content” demo).
- passing the title as a GET (or POST) variable to an external zem_contact_reborn page that you load in the modal box and use the adi_gps plugin to retrieve the variable from the url (or form button) and insert it as the subject (again using single quotes for the attribute
... default='<txp:adi_gps name="article-title" />' ....).
Maybe there’s just an implementation error? Some suggestions:
For 1) start by just making a zem_contact_reborn form in a div at the end of your article and get that to work. Then deal with hiding it and making a popup in a second step.
For 2) If you get it working but find your title gets broken because of the spaces it contains, trying using a POST-variable instead of an url with ?article-title="<txp:article><txp:title /></txp:article>".
TXP Builders – finely-crafted code, design and txp
Offline
Re: Is there any way to use article tags outside of article context?
AndrijaM wrote:
what would that return, url like my-article-title ? Doesn’t look pretty for subject, I’ll leave that as the last option if nothing else comes out.
No, it would return the value of the url parameter “my-article-title” which you’d set on the previous page with
<a href="<txp:site_url/>contact-form?article-title=<txp:title />">Link to Contact Form</a>
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: Is there any way to use article tags outside of article context?
Try with single quotes when you use a txp-tag as an attribute of another txp-tag (=process this tag and put the result here), e.g.:
THATS IT!
<txp:zem_contact_text label=“Subject:” default=’<txp:article><txp:title /></txp:article>’ name=“tema” break=”“ required=“0” />
that works! :)
thanks Jakob, and thank you all guys for helping out!
Last edited by AndrijaM (2011-03-23 19:50:29)
Offline
#23 2011-10-21 01:37:15
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: Is there any way to use article tags outside of article context?
Hi,
I am trying to do the same thing, using a form that sends the title of the article.
Got that working when the form is in the page, but when I put it in an inline div that is hidden with css, and then open it in a modal window, I can’t fill in the form.
any ideas why this is happening?
I am using Prettyphoto
Offline
#24 2011-10-21 10:32:32
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: Is there any way to use article tags outside of article context?
mlarino wrote:
I can’t fill in the form.
What exactly does that mean?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#25 2011-10-21 11:09:57
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: Is there any way to use article tags outside of article context?
That I can’t type anything, the keyboard is not working…
http://www.mlarino.com/asesoria/1544
on the left column click on the last button. (PEDIR MAS INFORMACIÓN)
Offline
#26 2011-10-21 11:17:35
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: Is there any way to use article tags outside of article context?
Yup, same here :[
If you paste text and send the form, does it handle it? I.e. is it worth the hassle at all? I didn’t see form examples on the prettyphoto page.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#27 2011-10-21 11:20:49
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: Is there any way to use article tags outside of article context?
Well, I need a modular form inline in the page, because I need to send the page title with it, to know what apartment they are interested in.
Offline
#28 2011-10-21 11:31:59
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: Is there any way to use article tags outside of article context?
:)
I simply meant “Perhaps try another one.” One that has a form example. I thought my one-and-only Fancybox had such, but I was wrong. Nevertheless, I’d give it a try.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#29 2011-10-21 13:47:24
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: Is there any way to use article tags outside of article context?
The <div class="pp_hoverContainer"> has z-index: 2000;.
Offline
#30 2011-10-21 13:53:24
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: Is there any way to use article tags outside of article context?
What should the z-index be for it to work?
Offline