Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-09-18 13:15:46

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 72

How to link file with article ?

I have a section of E-book on my txp project each book has title, image, description and I handle them with articles + created a category of E-book.
Now I want to upload books from Content --> Files and how i can link any file to the article (book details) for download option with easy way or dynamic ?

Offline

#2 2017-09-18 13:38:01

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

Re: How to link file with article ?

If you want to link a file or files to an article, set up a custom field as article_file and use it to store the file id number (or numbers separated by commas). You can then include the custom field as an attribute of another tag, for example to generate a download link or list.

If you want to do it the other way around – link an article to a file – you can use jcr_file_custom.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2017-09-18 17:25:05

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,032
Website GitHub Mastodon Twitter

Re: How to link file with article ?

You can even call them directly in an article ie

<txp:file_download id="11">

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB