| Thursday 17 May 2007 11:52:36 am 
                                                                
                                                                 Hi, I’m trying to create a “pdf version” link next to the “E-mail This Article”, “Print This Article” on the top of our article page. To create these links, the code is placed in our override article template as below: 
<ul class="HorizList" id="page_tools"><li><a href={concat('/content/tipafriend/',$node.node_id)|ezroot()}><img src="/images/icon.alert.envelope.gif" alt="Envelope" width="23" height="15" border="0" class="Icon">E-Mail This Article</a></li>
 <li><a href="#" onclick="if (window.print) window.print(); return false;"><img src="/images/icon.print.gif" alt="Print Article" width="23" height="18" border="0" class="Icon">Print This Article</a></li>
 </ul>
 The actual pdf document for the “pdf version” link will be stored in the Media library/pdfs folder. Within pdfs folder, I will upload the pdf document in a file type class.  In order to relate the pdf document to the article, I have added an attribute, “object relation”, to an article class. I am using this attribute to link to a pdf document in the Media library. To output the link, I wrote the code below: 
{if $node.object.data_map.pdf_version.has_content}<li><a href={$node.object.data_map.pdf_version.content.main_node.url_alias|ezroot()}><img src="/images/icon.adobe_pdf_logo.gif" alt="Download PDF Version" width="16" height="16" border="0" class="Icon">PDF Version</a></li>
 {/if}
 The link code, {$node.object.data_map.pdf_version.content.main_node.url_alias|ezroot()}, only takes me to the page where the pdf document is located: 
http://www.something.com/media/pdfs/pdf_test
 I’d like to create a link to download the actual pdf document as below:
 http://www.something.com/content/download/343454/3434399/file/pdf_test.pdf Is there a way to code the link to download the pdf document directly instead of going through an extra page? I know that Exponential has its own pdf creator, but our client wants to use their own pdfs.. I’m using version 3.8.7. Please help.. Many thanks… |