Tass Posted December 16, 2006 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. Link to comment Share on other sites More sharing options...
AbstractApproach Posted December 16, 2006 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 Link to comment Share on other sites More sharing options...
Tass Posted December 16, 2006 Author 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? Link to comment Share on other sites More sharing options...
AbstractApproach Posted December 17, 2006 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 Link to comment Share on other sites More sharing options...
smiles Posted December 17, 2006 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 Link to comment Share on other sites More sharing options...
Tass Posted December 17, 2006 Author 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. Link to comment Share on other sites More sharing options...
AbstractApproach Posted December 17, 2006 Share Posted December 17, 2006 Right- PHP includes work well, but you have to have server side scripting access. Link to comment Share on other sites More sharing options...
Sniffy Posted December 18, 2006 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. Link to comment Share on other sites More sharing options...
Anders Moen Posted December 19, 2006 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. Link to comment Share on other sites More sharing options...
ATM Posted December 21, 2006 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now