| ||||||||||||||||
| ||||||||||||||||
Replace block of HTML Posted by TedH (TedH), 26 February 2007 I can replace single element in an html template with no problem. For example: Code:
Code:
What I cannot figure out is how to replace an existing block of html. Say like below. Code:
with Code:
Is there an easy way to do that? The end result for this is block replacement for my blog script's closed months (I gotta get rid of those forms). cheers - Ted Posted by Custard (Custard), 26 February 2007 Hi Ted, hope you are well..Can you give us a bit more background? I'm not sure if you are using something like Template Toolkit or have your own template system. And a bit of code would round it off nicely.. Cheers B Posted by TedH (TedH), 26 February 2007 Kinda made up my own Code:
Where the input replaces the aaaaa The idea to use the Code:
was me just guessing that I needed something above and below the form to mark it out after the page has been made from the template. Page is used for one month, then the form usage is deactivated at present, but form still there. I figured it's less confusing to remove the form entirely. Does that make sense? - Ted Posted by TedH (TedH), 26 February 2007 I've tried this to see if I can extract the between the tags stuff Code:
While it can print to screen fine after opening the file and reading it into an array, anything else is beyond me. It's like if the two dots could be read into an array, then it could be replaced with whatever I define. - Ted Posted by TedH (TedH), 26 February 2007 Custard, I may be approaching this the wrong way.Maybe I should try matching the form then replacing it. There could be 31 HTML files, all of which would need the form replacing. I would have to loop through the folder, read in each file, match the form and replace it for each file. Does that make sense? I already replace all the scripts, but with a total rewrite to deactivate them. The HTML files, though, would need to retain everything except the form. I'll give that a go and see what happens. - Ted Posted by TedH (TedH), 24 March 2007 Hi Custard, sorry about the delay - been up to my ears in stuff.I still haven't got anywhere on this, but have put it on hold until for a bit. How are things your end? cheers - Ted This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| |||||||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |