Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-08-22 19:30:16

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

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

#2 2010-08-22 20:25:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,000
Website GitHub

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

#3 2010-08-22 21:49:26

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

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

Board footer

Powered by FluxBB