Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [SOLVED] links count?
I wasn’t aware of that limitation, but glad you got it sorted. Yes, you can do either:
<txp:variable name="total_links"><txp:php>echo safe_count("txp_link", "1 = 1");</txp:php></txp:variable>
Below is every resource read or considered to some extent for the development of content in this website. New sources are added as they are considered. There are currently <txp:variable name="total_links" /> source items.
or:
<txp:php>global $variable; $variable['total_links'] = safe_count("txp_link", "1 = 1");</txp:php>
Below is every resource read or considered to some extent for the development of content in this website. New sources are added as they are considered. There are currently <txp:variable name="total_links" /> source items.
TXP Builders – finely-crafted code, design and txp
Offline
Re: [SOLVED] links count?
Destry wrote #332821:
the real problem seems to be that you can’t add the
txp:php
tag in an excerpt field.
Are you sure it’s not just Textile getting in the way? Try turning the Textfilter to Leave Text Untouched in the Excerpt field and see if that works.
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