Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-05-31 19:03:08

vi0
New Member
Registered: 2014-05-31
Posts: 2

Include download file in article

Hey. May I am too stupid, but after uploading a file, I cant include it in article.
I googled a lil bit around and found many txp but no one works.
id is 1, file name is cookie-clicker.png

Thanks for helping. :)

Offline

#2 2014-06-01 00:33:03

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

Re: Include download file in article

What have you tried?

Offline

#3 2014-06-01 01:03:44

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: Include download file in article

Welcome to the Textpattern forum!

Just as maruchan suggests, we need more information like you’ve tried it and what you wanna do. There are several methods and even I suspect that you may want to integrate a picture (“cookie-clicker.png”). On the other hand, files are for download.

Offline

#4 2014-06-01 09:22:01

moon blake
Member
From: near Hannover, Germany
Registered: 2009-07-16
Posts: 76

Re: Include download file in article

If you want to offer a file for download you have uploaded via content/files the usual way is the download tag:

<txp:file_download_link id="XX">your link text</txp:file_download_link>

which will enable the download of the file specified by its ID.
More information in the docs

Last edited by moon blake (2014-06-01 09:22:38)

Offline

#5 2014-06-05 05:48:36

vi0
New Member
Registered: 2014-05-31
Posts: 2

Re: Include download file in article

Sorry I wasnt here so long, my internet was broken.
I just want to include a simple pic in my article,
so I uploaded the pic under event=image and tryd to include it, but how?

Next, I have a savegame I want to share, so I uploaded it under files, but no way for me.

I tryd too much, I dont find any code again, sorry.

After reading the wiki again, I even dont understand how I can include an pic oder file with the id.

So I tryd what moon blake posts:
<txp:http://example.com/blog/file_download/1/cookie+clicker.txt id=“1”>Savegame</txp:http://example.com/blog/file_download/1/cookie+clicker.txt>

and it didnt work again. May I missunderstand nearly everything in txp?

EDIT:
Ok I am defi stupid! <txp:file_download_link id=“1”>Savegame</txp:file_download_link id=“1”> works…
sorry!

Last edited by vi0 (2014-06-05 05:55:23)

Offline

#6 2014-06-06 16:28:43

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Include download file in article

W/ regards to including the picture, there are a couple of ways.

1. Associate a picture with the article. Then, provided your template is set up correctly, when the page is rendered each article will show the picture (if there is one) that has been associated with it.

2. Include the picture in the body of the article. You can use html, text pattern, or textile mark up for this. There is a tag builder in the image panel to help you.

The latter is how I more often add an occasional picture on my personal sites. Just a preference.

Offline

Board footer

Powered by FluxBB