| Edocs - Advanced usage |
Bypass the default root pathSometimes it can happens that you need to embed a document that don't resides in a subfolder inside the default root folder (example: the default root folder is "images/stories/ and the document to embed is in the folder [root]/templates). To bypass the default root folder, just add a trailing slash "/" to the document path into your article.Example: if the default root folder is "images/stories" and you use the default code: {edocs}path/document.pdf,200,300{/edocs} the final path will be http://www.yoursite.com/images/stories/path/document.pdf. Instead, if you use this code: {edocs}/templates/mytemplate/document.pdf,200,300{/edocs} (note the starting trailing slash) the final path will be http://www.yoursite.com/templates/mytemplate/document.pdf External documentsIf you need to embed external documents (from external sites), just write the full address of the document (remember to include http://...).Example: {edocs}http://infolab.stanford.edu/pub/papers/google.pdf,600,300{/edocs} Styling embedded documentsEach document embedded with Edocs is inserted in a div. If you need more control over each embedded document, you can use the class "edocs_viewer" inside your CSS.If you need more control, over a single embedded document, you can set an ID into the container div of the embedded document. To do that, add the ID name as the fourht parameter. The code is: {edocs}my_documents/pdf/catalogue.pdf,300,200,link,my_div_id{/edocs} Where my_div_id is your custom id for this specific embedded document. If you don't need the download link, just insert the ID but don't forget the empty comma: {edocs}my_documents/pdf/catalogue.pdf,300,200,,my_div_id{/edocs} !Please, pay attention to the empty comma! |

