I have a craigs list add template made, that i can enter in a product name, price and image. in order to post the page to craigs list i needs the source code for the page. to make it easy for the client to make his craigs list adds.
is there a way to display the code, or a section of the html code of the webpage inside of itself?. so when he makes a new page with the template. the code in the "display box" is correct for him to copy from.
I could use any pointers at what direction i should take to get this done.
Hmm, just theorising here but there is a system event named OnWebPageComplete, you could write a plugin to catch this event, get the page content and write it into your textarea above, when the page is shown the content in HTML should be in this text area. You will have to do a bit of filtering because this will be called for every page, maybe you could call your text area something like ’craigstext’ and when the event fires check the content for this name, if present fill in the text area, if not do nothing.
Use MODx, or the cat gets it!
Another approach could be to set up your tinymce editor with predefined templates, which are then added to the content area with the click of a button when creating or editing a page.
Then after the client completes the page(ad) he can use the code button to show the source of the page, then copy/paste that into the craigslist ad space.
To set up the tinymce editor for predefined templates check here:
http://modxcms.com/forums/index.php/topic,30069.msg182569.html#msg182569
With this method, the published page would look exactly like the ad he places.
I don’t know how it possible, but can be very nice if you could have a text area box that is updated as you type.