Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-12-30 20:59:44

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

test for no results

Is there a way to output something if no articles are found?

Offline

#2 2009-12-30 21:14:54

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: test for no results

Set variable containing your wanted article tag(s).

<txp:variable name="articles" value='<txp:article />' />

Test if something is there:

<txp:if_variable name="articles" value="">
	Nothing found.
</txp:if_variable>

Output variable:

<txp:variable name="articles" />

See:

For search results there are some in-build tags:

Offline

Board footer

Powered by FluxBB