Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2005-04-20 16:07:42
- Remillard
- Plugin Author
- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Just as a sanity check, are you using this in a form? An article form is the only place where there is an article context to check for the custom field. I still need to build a testbed for my plugins so I’ll try to get working on that, but this might be a quick thing to check.
Offline
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
ah, remillard, you hit the nail on the head. I was using it as an article form, but outputting it as <code>
<txp:output_form form=“myconditionals” />
</code>
using <code>
<txp:article form=“myconditionals” />
</code>
did the trick
sorry about that, i’m still learning :P
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
er, what would my mother say?! i forgot to say THANK YOU very much!
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
#16 2005-04-20 17:28:53
- Remillard
- Plugin Author
- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Oh don’t worry about it :). Glad it fixed it. I should put that note in the top explanation. Having the article context in which to check the specific fields is pretty important.
Offline
#17 2005-04-22 02:43:44
- Andrew
- Plugin Author
- Registered: 2004-02-23
- Posts: 730
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
just fyi :: changeset 309 adds <txp:if_custom_field>
as a core feature. (not sure about the ‘else’ feature)
Last edited by Andrew (2005-04-22 02:45:17)
Offline
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
whoaw!
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#19 2005-04-24 17:32:18
- Remillard
- Plugin Author
- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Honestly, it’s fine by me if I’m obsolete (wouldn’t be the first time that’s happened ;-) ). Plus, I’ve come to think that there an awful lot of these plugins that SHOULD be in the base distribution. Then folks can spend their time writing the COOL plugins (like Audioscrobbler, which I“m going to have to try to figure out how to integrate.)
Offline
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Hi Remillard,
Great plug-in, but I think I may be using it incorrectly –
<code>
<h3>Recent News:</h3><br/>
<txp:mdn_if_custom field=“publish_on_front_page?” empty=“1” equal=“yes” notequal=“no”>
<txp:article form=“cltc_article_form” listform=“cltc_list_form” limit=“10” status=“live” />
</txp:mdn_if_custom>
</code>
This should output an article if the field is empty or the value is “yes”. A value of “no” means it shouldn’t output.
Any ideas on where I’m going wrong?
Offline
#21 2007-06-08 22:29:29
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Hi Remillard, thanks for this great plugin! It’s incredible how versatile one can use it and how many possibilities it opens to finetune a pages output. And it still works with 4.0.4!
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Hey, uli, why didn’t you use the built-in txp:if_custom_field conditiontal tag?
Is there anything this plug-in does that built-in tags don’t do?
Offline
#23 2007-06-09 00:52:59
- Remillard
- Plugin Author
- From: Lenexa, KS
- Registered: 2004-05-16
- Posts: 169
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
Well you’re welcome and frankly, I’m stunned :-)
I think the only thing mine did that 4 didn’t was that I had inversion selectors for sections and such. and that was many TXP versions ago. I would be surprised if it wasn’t completely encompassed by stock template commands.
Best of luck
Remillard
Offline
#24 2007-06-09 22:00:14
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: [ARCHIVED] mdn_if_custom: custom field conditionals
:))
maniqui and Remillard, I can understand your disbelieve. Maybe it’s just my lack of deeper comprehension/non-programmer-readable documentation that I use it? But for what I did here I couldn’t get it running with txp:if_custom_field.
Perhaps you can shed a little light on why it works at all, Remillard, as I’ve had to use your tags a little … unkosher (see 4.).
edit: got it! I copied code that used curly quotes. I’ve rewritten the linked example using if_custom_field.
Dear Textbook authors: Sorry for my complaints if_custom_field needed human readable documentation. It was changed and supplemented since my last visit.
Last edited by uli (2007-06-11 00:06:16)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline