-
Is it possible to build HTML modules to be called to save repetitive code?
I occassionaly have an issue with having to do global changes in multiple web pages. I always start from a basic template page but sometimes when adding to the page certain things do get moved or change slightly and a global change does not always work.
I was wondering if it is possible to build certain code blocks as modules and call when needed similar to using a javascript module?
-
-
There are many ways to dynamically include the contents of an external file across multiple pages on your site. For example, if your pages are of the .shtml extension, you can use SSI to accomplish the task: http://www.javascriptkit.com/howto/ssi2.shtml If your pages are PHP, there's the include() function for that purpose, and so on.
-
-
use templates in dreamweaver.... it will allow you to make changes in 100 pages on one click on the master page.
sig removed by admin- You're not allowed to have a sig until you have 5 or more posts.
Last edited by ddadmin; 01-09-2008 at 01:11 PM.
-
-
You could also (possibly) do that using JavaScript, but that is commonly considered bad practice as some browsers don't allow javascript. However, if the page was not on a server with a server side coding language, your best (and only, as far as I can think of) would be to put your code into a Javascript file, and load it as such. However, as I said, this is commonly not considered practical.
My recommendation to solve the non javascript enabled browser is to have a backup template that you wouldn't need to change very often put within noscript tags, and put your main template within external javascript files.
Sorry, but that is the only solution I can think of that doesn't involve Server Side coding, although a simple <?php include("dhjfh.php"); ?> php tag wouldn't be hard, but if you do not have access to php or asp or whatever... then you pretty much are screwed, and have to edit all pages by hand
-
-
simply use MODx CMF!!! Best cms of the world
!!!
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks