I’m looking to make a TV that will allow my user to see a resource’s full URL (including domain) inside the Manager, while editing the document. Before I start working on this, is this even possible? I realise that the resource has to be saved first in order for the alias to be generated.
The reason for this TV is that my user will create documents that will not be in any menues and effectively hidden from plain view (yet still be published). They’ll be using this for landing pages and need to paste the URL for newsletters.
Help is, as always, very much appreciated!
An easier (and maybe better) approach would be to have the users enter MODx link tags where they want the URLS:
Where nn is the document ID of the document you want a URL for. MODx will generate the URL for you and it will work regardless of FURL settings or the location of the site.
Hard-coding URLs means the site can’t be easily moved or duplicated on a local machine for testing and upgrading and may break if the FURL setting is changed or a document is renamed.
-
☆ A M B ☆
- 24,524 Posts
If they’re using a MODx document for the newsletter, they don’t need to do that. The regular TinyMCE "Insert Link" button will open a popup window; the second field has an icon to its right that will allow choosing a (published) document to link to; the MODx tags for the document will be inserted. When using the document for a newsletter, it will get parsed and the URL generated from the tags as usual.
-
☆ A M B ☆
- 24,524 Posts
Can’t your newsletter application use a given URL for its newsletter? That’s what I do for the DADA mail perl application that I favor; the user creates his newsletter as a MODx document. I have the DADA template set up to use a specific page as its newsletter, and the user just edits the old one (or if he wants to keep them for archive purposes, duplicates it and makes sure to put in the correct alias in the new one as he edits it).