Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
One Table in Two Locations on the Site
I have a table of a season’s racing results which we need to update after each race meeting. The table is marked up using Textile in a Textpattern article assigned to the relevant section that uses the default TXP page. Now, we need to display the same table in a modular window too elsewhere on the site. We currently do that by copying the table to a new article in a TXP section, Ajax, which uses a TXP page suitable for an Ajax call into the modular window. Is there a neater way to achieve this using a single copy of the table, bearing in mind that it must use Textile markup? There must be, but I am not getting it.
Offline
Re: One Table in Two Locations on the Site
Not sure if I follow you correctly – particularly what you mean by a modular window (modal window, maybe?) – but two avenues to try:
<txp:article_custom id="123" />
will output a specific article with ID 123 wherever you need it, also when not in context. Sorry if that was too obvious.- If there’s some reason why the normal txp-tags can’t work, maybe you can create the output you need with the help of rah_external_output and then reference it where you happen to need it, e.g. as if it were an external link for a modal window.
TXP Builders – finely-crafted code, design and txp
Offline
Re: One Table in Two Locations on the Site
Thanks Jakob. Yes, I meant ‘modal’ not modular. The article_custom tag seems to work, it simply had not occurred to me to put it inside another article, so don’t feel bad about being too obvious.
Offline