Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello! I am an absolute beginner at web-building, please forgive me if my question is too simple...

I've built a website (just HTML and CSS) and implemented Couchcms. This works perfectly (Woohoo! :D ) My "client" (my father ;) ) has but 1 request. Apart from a "news" section (text), he wants to be able to upload (Word)documents for the visitors of the site to download. A different document (or several) every week.

He can do this via the editor (Link > Browse Server > Upload). This generates a link to the file on the page, and that works. However, the link looks like this: http://www.mysite.com/couch/uploads/file/document.doc. Works as designed, I guess.

You probably guessed my question, which is straightforward:
How do I change the cms:editable region to display the link as just document.doc ?

So it shows on the website as:
DOWNLOADS:
document1.doc
document2.doc

I have to make sure my dad doesn't have to do any coding himself, the uploading is enough of a challenge for him as it is :|

Thanks so much in advance!
Hi :)
He can do this via the editor (Link > Browse Server > Upload). This generates a link to the file on the page, and that works. However, the link looks like this: http://www.mysite.com/couch/uploads/file/document.doc.
The editor shows the complete link when no existing text in the editable region is selected before invoking 'Link > Browse Server > Upload'.

Just add a little step to your procedure and you'll be able to style the link as you wish -
type 'document.doc' in the region, *select* the text by dragging your mouse across it and now upload the file as you have been doing.

You'll find that the editor now retains the selected text and in the background adds to it the link to the uploaded document.

Hope it helps.

P.S.
I'm assuming the use-case is to place the links at arbitrary locations within the contents of the editable region. Your method is fine for that.

If, however, there can be fixed location on the template where you'd want to display the list of downloadable documents, using 'repeatable-regions' (http://docs.couchcms.com/concepts/repea ... gions.html) should be easier to manage by clients.

Let me know if that interests you and you need any help with it.
Thank you! That is so simple, I could have thought of that! :oops:

Yes, this is just fine for now, but I'll look into the Repeatable Regions. See if I can get that to work :D

Thanks again for the help, I'm gonna show my dad!

Cheers,
R.
3 posts Page 1 of 1