Hello, I am sure I am missing something here.
Lets say a content editor wants to upload a PDF, or some PDFs to their site, and put a link to it (them) on a page. The best way to do this, to keep things maintainable, is to upload the file then create a weblink to the file, and then use the weblink [~id~] to link to it in document content. Then if the PDF changes, you just update the weblink and any documents referencing the pdf will get the new file.
They can use the file manager in modx to upload the file. But when it comes to creating a weblink, the only option appears to be to manually type the path to where the file is visible on the site.
Using a TV in this instance doesn’t seem to be feasible as there could be any number of documents the content editor would want to link to.
So how is this best approached?
Thanks,
Paul
You can make links directly to uploaded files. Click on the icon to the right of ’Link URL’ when you’re making a link and that takes you to the uploaded files.
Hmm.. I am still missing something.
If I create a weblink, I don’t have "Link URL", but "Weblink" as the field to complete for the URL. If I click the icon next to it, I get the normal "open folder" image, which responds to clicking something in the document tree.
How can I get the dialog up?
To use a weblink to link to a document you would need to input the file path manually. It does not provide specific support for linking to files, it is basically intended for linking to document/pages or remote sites.
The TV is the only tool that provides the upload and file management features. Create a template to use for the ’file’ documents and add a file tv to it. Then rather than using [~id~] to generate the direct link use [*tvName*]. Then use ManagerManager plugin to hide all the fields that are not needed for the ’file’ documents (content, long title, etc..).
Ah right I see.
Yes, so the files are just TVs within documents specifically templated to be links to files.
But if I want to add a link to the content section of another document, I cannot use [*tvName*] as that would be referring to a TV in the current document.
How would I add a link created from a TV within another doc without a snippet?
Unless I’m not understanding you, I don’t know why you would make a weblink here at all.
Here’s what I do:
- Upload the file
- Go to the page I want to link from
- Highlight the relevant text (as though I was making an ordinary link) through the TinyMCE editor
- Click on the link icon
- Now when the link pop-up appears, I click on the icon to the right of ’Link URL’
I’m guessing you’re trying to do something more complex, but I must admit I’m not sure what it is. Are you trying to link to a file from a navigation menu?