Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Container tag for search term in an article
I have a new Textpattern-powered project in the works, and I’m trying to simplify / streamline a workflow for when an article contains a string that is hyperlinked to a search. For example, the terms ‘consectetur adipiscing’ and ‘pulvinar lacinia’ in an article are links to a search for that term:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt maximus varius. Praesent leo risus, pulvinar lacinia justo in, eleifend venenatis neque.
I’ve checked the Textpattern search tags and not found anything that fits the bill.
Ideally, an article could be written and a container tag would be tacked around the term(s) that are to be hyperlinked, and Ye Trusty TextpatternMagick© does the rest.
My instinct says this is already a solved problem, but I’m not sure how. Any feedback or advice would be very gratefully received. Thank you.
Offline
Re: Container tag for search term in an article
Not sure to understand you right, but if you want to construct search links via a container, why not to create a form (say, search
):
<a href="search/URL/for/<txp:yield escape='url' />"><txp:yield /></a>
and call it where you need like
... <txp::search>pulvinar lacinia</txp::search> ...
Offline
Re: Container tag for search term in an article
Thanks, etc – that looks promising! I really appreciate that.
Offline