Tass 0 Posted December 16, 2006 Report Share Posted December 16, 2006 I'm quite new to html was wondering something. I started my template and that is done. I started creating content and realized what if I wanted to change something.. I'd have to go through all the pages and manually change them one by one.. What if I had hundreds of pages? It was going to take forever.. is there a way I can do this? I'v looked around, but I'm not completly sure. If someone could point me in the right direction, that would be nice. Quote Link to post Share on other sites
AbstractApproach 0 Posted December 16, 2006 Report Share Posted December 16, 2006 I'm quite new to html was wondering something. I started my template and that is done. I started creating content and realized what if I wanted to change something.. I'd have to go through all the pages and manually change them one by one.. What if I had hundreds of pages? It was going to take forever.. is there a way I can do this? I'v looked around, but I'm not completly sure. If someone could point me in the right direction, that would be nice.Depends on exactly what you're trying to do. If you're trying to standardize, say, a header, than the best way to do it is with server-side-include, in your favorite server-side language.If you can't use server-side, you can use javascript to write it into your file, though that becomes annoyingly verbose really fast.//Matt Quote Link to post Share on other sites
Tass 0 Posted December 16, 2006 Author Report Share Posted December 16, 2006 I cannot use SSI or ASP on the current server I'm using. Are there any other alternatives besides Java, if not where can I start? Quote Link to post Share on other sites
AbstractApproach 0 Posted December 17, 2006 Report Share Posted December 17, 2006 I cannot use SSI or ASP on the current server I'm using.Your only hope is javascript. What you do is convert the HTML you want to to keep constant throughout pages into javascript by writing it with document.Write(). Turn your code into a function, then put the function in a .js file, include it in the head tag of whatever pages you need the content in. Then just call your function in the document wherever you need the content (instead of directly copying the content). Now, when ever you need to change that content, simply edit your javascript function.//Matt Quote Link to post Share on other sites
smiles 7 Posted December 17, 2006 Report Share Posted December 17, 2006 I started creating content and realized what if I wanted to change something.. I'd have to go through all the pages and manually change them one by one..The so-called "content" here as you say is the appearance or template exactly ( CSS or Javascript ... )certainly , everyone must change the content of pages when needed Quote Link to post Share on other sites
Tass 0 Posted December 17, 2006 Author Report Share Posted December 17, 2006 well content is what makes up the page.. not how it looks, anyways I just started using php includes which helped out a lot and made my site way more organized for me. Quote Link to post Share on other sites
AbstractApproach 0 Posted December 17, 2006 Report Share Posted December 17, 2006 Right- PHP includes work well, but you have to have server side scripting access. Quote Link to post Share on other sites
Sniffy 1 Posted December 18, 2006 Report Share Posted December 18, 2006 Also, the PHP require(somefile.php) function is similar, but if the required file cannot be loaded into the page, it will cause an error instead of just loading without the file. Quote Link to post Share on other sites
Anders Moen 2 Posted December 19, 2006 Report Share Posted December 19, 2006 If you are able to use PHP that would be the best. Then you could just use this code:<html><head><title>your title</title></head><body><?phpinclude("ForExampleMyBanner.php")?>And here's e.g the article</body></html>And just use that code on each site, and if its a banner you use in there, you could just change the banner url in that file, and it would change on all of your sites that got the include PHP code. Quote Link to post Share on other sites
ATM 0 Posted December 21, 2006 Report Share Posted December 21, 2006 If you want a way to do it without using any codes, open all files on dreamwearer (if you have it) or another program that has a find and replace function.go edit > find and replace select all open documents and then put in your current code and the one you want to replace it with. Make sure you use a peice of code that is not going to change something you don't want to change.this is the best way if you don't have server-side scripting.Unless you included a javascript file with all the variables on it using '<script>' and then your page wrote those variables. I don't think you can use it for everything though. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.