Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-09-13 13:22:12

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Display articles which use an overriding form

Hi, is there a simple way to display articles based on the use of the Override form feature or is it another job for etc_query?

Edit: I’ll use a custom field otherwise… yeah… could be simple.

Last edited by NicolasGraph (2015-09-13 14:25:53)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2 2015-09-13 13:45:43

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Display articles which use an overriding form

NicolasGraph wrote #294765:

display articles based on the use of the Override form feature

Do you mean “Show only articles that have no blank entry in their override form menu in Content > Write”?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2015-09-13 13:47:51

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Display articles which use an overriding form

uli wrote #294768:

Do you mean “Show only articles that have no blank entry in their override form menu in Content > Write”?

Yes!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#4 2015-09-13 13:51:28

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Display articles which use an overriding form

You could try …

<txp:if_custom_field name="override_form" value="">
   Field is empty
<txp:else />
   Override form in action
</txp:if_custom_field>

… or some magic with custom_field and if_variable.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2015-09-13 14:00:38

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Display articles which use an overriding form

uli wrote #294770:

You could try …

<txp:if_custom_field name="override_form" value="">...

… or some magic with custom_field and if_variable.

override_form is a custom field?! Oh yes… I should think about that as I also used <txp:custom_field name="article_image" /> sometimes…
Thank you to wake me up Uli!


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#6 2015-09-13 14:23:12

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

Re: Display articles which use an overriding form

Glad it works (oops, does it?), but I’m sure I only filled an interim gap until Oleg finds this here :)

Last edited by uli (2015-09-13 14:23:25)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2015-09-13 14:30:52

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Display articles which use an overriding form

If override_form is a custom field, this should work: <txp:article limit="1" wraptag="div" class="article" override_form="article_video" /> isn’t it? Unfortunatly override_form is not accepted as an article attribute…

Last edited by NicolasGraph (2015-09-13 14:31:38)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#8 2015-09-13 14:36:39

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Display articles which use an overriding form

Using a ‘classic’ custom field with txp conditions and variables will do the trick.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#9 2015-09-13 19:48:10

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Display articles which use an overriding form

uli wrote #294774:

Glad it works (oops, does it?), but I’m sure I only filled an interim gap until Oleg finds this here :)

You guys are sweeping the dirt under the carpet, and you know it. :)

Offline

#10 2015-09-18 17:29:04

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: Display articles which use an overriding form

etc wrote #294783:

You guys are sweeping the dirt under the carpet, and you know it. :)

Under the carpet?
Ok… What do you think about that Oleg?

<txp:etc_query data="override_form LIKE '%my_form%'" markup="db" populate="article">
	<txp:excerpt />
</txp:etc_query>

Better?…
You are right, it was not so hard to find… :)

Last edited by NicolasGraph (2015-09-18 17:33:31)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#11 2015-09-21 19:17:07

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: Display articles which use an overriding form

NicolasGraph wrote #294966:

Better?…

Perfect! :) Custom fields will work, of course, but it looks like a bit redundant.

Offline

Board footer

Powered by FluxBB