Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2020-03-30 11:40:32

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: Textpattern evaluation (dis)abilities

I need to do a check:
if there is an article with the status “sticky” and with the keywords=<txp:section />, then we display
<txp:article status="sticky" form="page-sections-sticky" keywords='<txp:section />' wraptag="div" class="section_sticky"/>
otherwise display
<h1 class="section-title"><txp:section title="1" /></h1>

Doing so:

<txp:evaluate query='<txp:article keywords /> = <txp:section />' >
	<txp:article status="sticky" form="page-sections-sticky" keywords='<txp:section />' wraptag="div" class="section_sticky"/>
		<txp:else />
	<h1 class="section-title"><txp:section title="1" /></h1>	
</txp:evaluate>

How to make a keyword comparison request?


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

#74 2020-03-30 12:50:40

etc
Developer
Registered: 2010-11-11
Posts: 4,546
Website GitHub

Re: Textpattern evaluation (dis)abilities

You could try with <txp:article_custom /> itself:

<txp:article_custom status="sticky" keywords='<txp:section />' wraptag="div" class="section_sticky"/>
	<txp:output_form form="page-sections-sticky" />
<txp:else />
	<h1 class="section-title"><txp:section title="1" /></h1>
</txp:article_custom>

Offline

#75 2020-03-30 13:44:10

singaz
Member
Registered: 2017-03-12
Posts: 150

Re: Textpattern evaluation (dis)abilities

Everything turned out to be simple.

Thank you!


Sorry my horror English. I’m learning textpattern, I’m learning English

Offline

Board footer

Powered by FluxBB