Picture of Thomas Schmidt
Documents and linking
by Thomas Schmidt - Monday, 3 March 2014, 4:46 PM
 

Hi,

maybe a quite silly question - but I cannot find a solution. I not a Tech Person - so maybe there is no real problem...  :-)

How can I put a link in a component? Lets say I want to open a PDF ord Word Doc from a internal Filesoure like: couse/en/docs/blabla.pdf

Easy?

 

Cheers

Thomas

Picture of Brian Quinn
Re: Documents and linking
by Brian Quinn - Monday, 3 March 2014, 5:34 PM
 

Hi Thomas,

The 'body' attribute of any article, block or component should be able to take a valid HTML string, so you could either insert it into the articles.json or blocks.json, or create add a text component to the components.json.

For example, using a text component it might look something like this:

 {
        "_id":"c-05",
        "_parentId":"b-05",
        "_type":"component",
        "_component":"text",
        "_classes":"",
        "_layout":"left",
        "title":"My first link",
        "body":"Click <a href='docs/blabla.pdf'>here</a> to view a PDF document"
    },



Regards,

Brian

Picture of Thomas Schmidt
Re: Documents and linking
by Thomas Schmidt - Monday, 3 March 2014, 5:44 PM
 

PERFEKT!

Thank you so much - that works!

Cheers

Thomas