Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-10-24 15:34:15
- wspence
- Member
- Registered: 2006-09-03
- Posts: 84
Possible to insert txp tags into an article?
such as say <txp:output_form form=“insert form name here” />
Thanks!
Last edited by wspence (2007-10-24 15:49:59)
Offline
#2 2007-10-24 15:41:40
- wspence
- Member
- Registered: 2006-09-03
- Posts: 84
Re: Possible to insert txp tags into an article?
or to have an article layout to change by category rather than section…sorry if I’m confusing myself.
because this is what I’m having to do with article images with lightbox for example
== <div class="storyPhoto"><a title="The Fridge" href="http://farm3.static.flickr.com/2136/1633006269_9af5fb8222.jpg?v=0" rel="lightbox" caption="The Fridge"><img width="250" heigth="187" src="http://farm3.static.flickr.com/2136/1633006269_9af5fb8222.jpg?v=0"></a>
<p>The Fridge has posted<br>a 4-2 record against the Hoos.</p></div> ==
thanks in advance!
Last edited by wspence (2007-10-24 15:48:45)
Offline
#3 2007-10-24 16:12:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Possible to insert txp tags into an article?
You can use txp tags in html tags: <div class="<txp:category1 />">...</div>
.
To use a txp tag inside another txp tag you’d need asy_wondertag. Like this:
<txp:asy_wondertag><txp:output_form form="form-<txp:category1 />" /></txp:asy_wondertag>
Offline
#4 2007-10-24 20:20:21
- wspence
- Member
- Registered: 2006-09-03
- Posts: 84
Re: Possible to insert txp tags into an article?
ok I don’t think I explained myself well enough. I want to be able to post the an image location when entering in an article image. Think is I want it styled the way I have it styled using light box. So what I want to do is essentially replace
== <div class="storyPhoto"><a title="The Fridge" href="http://farm3.static.flickr.com/2136/1633006269_9af5fb8222.jpg?v=0" rel="lightbox" caption="The Fridge"><img width="250" heigth="187" src="http://farm3.static.flickr.com/2136/1633006269_9af5fb8222.jpg?v=0"></a>
<p>The Fridge has posted<br>a 4-2 record against the Hoos.</p></div> ==
and not have to break out of using textile. I want to make an article easier to author and having to copy and paste the html for every article isn’t helping matters. The thing is I don’t know how to do this any other way than to break out of textile using then the code and doing this by hand. Any help you may have would go a looooong way.
Last edited by wspence (2007-10-24 20:21:39)
Offline
#5 2007-10-24 21:51:29
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Possible to insert txp tags into an article?
OK, I’m not entirely sure I’m getting it now, but here is another try.
You could use custom fields. And then in the article form:
<div class="storyPhoto">
<a title="<txp:custom_field name="img_title" />" href="<txp:custom_field name="img_location" />" rel="lightbox" caption="<txp:custom_field name="img_title" />">
<img width="<txp:custom_field name="img_width" />" heigth="<txp:custom_field name="img_heigth" />" src="<txp:custom_field name="img_location" />">
</a>
<p><txp:custom_field name="img_caption" /></p>
</div>
Something like that.
BTW I’m not sure if ‘caption’ can be used as an attribute.
Offline
#6 2007-10-25 14:59:50
- wspence
- Member
- Registered: 2006-09-03
- Posts: 84
Re: Possible to insert txp tags into an article?
caption is an attribute for lightbox
Offline