I want to pre-fill a template variable with the pagetitle and the page url.
I have a feeling the solution is a plugin. With a pseudo placeholder?
Have the default value for my template variable contain "My page name is [pagetitle]" then have a plugin search for "[pagetitle]" and replace it with $modx->getOption(’pagetitle’);
Would this be the best way to handle this?
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
I think that might work connected to OnDocFormPrerender, but why not just put [[*pagetitle]] in the TV’s default value (or [[+pagetitle]], if it’s going to be rendered by getResources()).
BobRay you are answering questions 24/7 !!!
I want to use it in a plugin. The editor would have the option to customize, but also to use a placeholder for pagetitle, date, and url etc..
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
Quote from: bwente at Jan 09, 2011, 06:34 PM
BobRay you are answering questions 24/7 !!!
I want to use it in a plugin. The editor would have the option to customize, but also to use a placeholder for pagetitle, date, and url etc..
What can I say -- I like giving advice and it’s nice to have found a place where I can do that without (hopefully) annoying people..
What I mean is, why not let the Editor enter standard MODx placeholders, leave them alone, and let MODx replace them when the page is rendered in the front end (assuming that there’s ultimately a front-end page involved)?