Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-03-02 07:47:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,601
Website

Re: Open PDFs in new window while using TXP

Glad that worked. I probably wasn’t so alert late last night, but I think you can also lose the article_custom tags too as IIRC file_download_list doesn’t require an article context. The variable shouldn’t need it either (assuming that it is the one made by adi_gps).

<txp:adi_gps />
<file>
<fileurl><txp:site_url />files/<txp:file_download_list id='<txp:variable name="fid" />'><txp:file_download_name /></txp:file_download_list></fileurl>
</file>

What I had originally wondered was whether you could use rah_external_output to receive the file id via an url query and then output the file right there on the mothership site. The rah_external_output code snippet would look up the right file path as it does now, then send the browser window to that page (using php header("Location: http://www.example.com/"); or perhaps derived from the code in that other thread I linked to above). That way you wouldn’t need to do the xml dance.


TXP Builders – finely-crafted code, design and txp

Offline

#14 2012-03-02 18:27:27

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 590
Website

Re: Open PDFs in new window while using TXP

Good points, Jakob. I was leaning toward XML because I will be using smd_xml and rah_external_output for another similar project (with quite a bit more XML), so I wanted to gain a bit of experience. But perhaps I’ll still try something like the header redirect example you gave. Thanks again.

Offline

Board footer

Powered by FluxBB