Hi
I am working in a project where I need to create HTML pages from text files as the template has been changed..I have almost 50 html pages with old template and content..now I would like update everything with my new template and I have text files for those files..In my new HTML pages I am going to change two blocks of text in all the pages..
ALl the pages are with same structure but some blocks of contents are different which I am not worried about..I am just going to change two blocks of contents in all the pages with my new content ..
I am looking for a script to open the directory with all the text files and generate the html pages for all the files ..my idea is to have the template(with new content for those two blocks) in the script and then open the directory read all the text files then generate it...
I am able to do this with just one text file and generate the html page but I am not sure how to do everything in a batch..Please help me out ...
I tried using opendir but it just takes the last file from the directory and just giving one html ouput .
I was thinking of other idea but not sure how to even start with it.
to write a script and then pass the current html pages like..when you mouse over the current url of one html page in the site then have this script take this content , replace those two blocks and show the new page to the user...but this way I am sure I cannot save the page but atleast I can show new content to the user..
Any ideas?/please help me out.
thanks
pragan.