Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-04-21 07:02:01

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Search tag for all content, not just articles.

Since I use a lot of pages with static text that is not within an Article, I’m wondering if I can create a Search tag that will show results of non-article content.


Living the Location-Independent Life: www.NuNomad.com

Offline

#2 2010-04-21 13:15:37

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,251
Website GitHub Mastodon Twitter

Re: Search tag for all content, not just articles.

there is wet_haystack which might be of use to you.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2010-04-21 14:29:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,942
Website GitHub

Re: Search tag for all content, not just articles.

Failing that (which only searches article fields not Pages/Forms etc, which is what I assume you mean) you’ll probably need smd_query or some PHP, although your code is going to be messy if you want to include/exclude certain forms/pages. And it’ll search your tags too so someone looking for txp or head for instance will find pages with any TXP tags in them and/or pages that have a <head> HTML tag!

Can you move the non-article content into articles in a ‘hidden’ section (one that’s not linked from your site navigation at least) and then use article_custom to call it into your page flow where necessary? Or create a load of txp:variables in a single form that is included on every page so you can then use <txp:variable name="my_content"> to display it?

In a similar vein, the adi_variables plugin might help here to allow you to create the content from a simple management pane and then include it later.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB