Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Need (good) advice
Hi folks ;)
For a current project, I need to display a block of text (a kind of ads to promote my client’s services) in front of all blogs contents.
These blocks must be chosen (by article id or by other internal choice system) or/and chosen randomly (so this is a limited list of static articles).
What’s the best plugin for this?
It seems there are a specialized smd_x plugin.
Thanks lot for your (best) advice.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Need (good) advice
Hi Patrick,
If I understand you correctly. You need a kind of a randomiser of short phrases to be included in all pages.
In which case I would go the semi native way and use the links tab. I posted a tutorial on txptips regarding randomisation.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Need (good) advice
Thanks lot!
Yeah, randomly or not (may be my client wants to choose a particular text to display).
But categories can be a good alternative in order to choose what to display.
Cool. Tks Yiannis.
Last edited by Pat64 (2015-06-22 14:12:55)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Need (good) advice
Pat64 wrote #291806:
Thanks lot!
Yeah, randomly or not (may be my client wants to choose a particular text to display).
Building on what I posted there, it could be
<txp:hide>the id number of the link in the linklist</txp:hide>
<txp:variable name="linkurl" value='<txp:link_url />' />
<txp:if_custom_field name="quotenumber">
<txp:linklist id='<txp:custom_field name="quotenumber" />'>
<blockquote><txp:link_description escape="" />
<cite><txp:link_title /></cite></blockquote>
<footer><a href="<txp:variable name="linkurl" />" rel="external"><txp:link_title /></footer></blockquote>
</txp:linklist>
<txp:else />
<txp:hide>if there is no quote id associated with a particular article, pick one at random</txp:hide>
<txp:linklist category="my_link_list_quotes_category" limit="1" sort="rand()" wraptag="" />
<txp:if_variable name="linkurl" value="">
<blockquote><txp:link_description escape="" />
<cite><txp:link_title /></cite></blockquote>
<txp:else />
<blockquote cite="<txp:variable name="linkurl" />"><txp:link_description escape="" />
<footer><a href="<txp:variable name="linkurl" />" rel="external"><txp:link_title /></footer></blockquote>
</txp:if_variable>
</txp:linklist>
</txp:if_custom_field>
You could of course edit the above to suit your own needs.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Need (good) advice
Ok. I see (and categories could be a good choice too).
Tks Yiannis ;)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: Need (good) advice
smd_featured with the sort="rand()" limit="1"
attributes might be a good fit too.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Need (good) advice
Thanks lot Jakob.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Pages: 1