HTML - Master Mages And Content Pages
Is it possible to have a asp control in the content section of a content page of a master page? If not what is a possible work around short of remaking the entire page?
Similar TutorialsEver since frames went out of style, I've wondered how to create a master-style page for a website. For example, a menu. The menu will be the same on every page. Without some way to encapsulate it, we have to duplicate that code on every page we create. Is there any way to put a marker/placeholder of some kind which represents the menu block, without having to put the actual code in each page? Of course you could do this with ASP/ASPX or PHP, but I'm looking for a purely HTML/CSS solution. Can it be done? Suggestions? Hi all, I know how to create master pages in asp.net but now I want to know how to create master pages in html? Could please anyone tell me by giving examples of the small code pieces? thanks in advance Zia In the past I have been designing websites to learn about web designing. In order to keep my sites update able I used frames and includes so I wouldn't have to make a chnage on every single page if there was a small problem. In the future I plan to design professional websites for people. So how do the webmasters who design websites keep the websites update able. I have seen advantages and disadvantages of using frames and includes. Now I want to know the professional and common way of how these webmasters are doing it, so I can also do my stuff that way too. Another question I have is as you know IE 6 does not support png's tranparent background. So what do the professional's do about this I have seen png's on professional websites but what happens to the IE 6 viewers thanks, ALi I have a lot of content on a page, and it is being added to every day. Because of the constant adding, the page becomes longer & longer. Instead of this happening, is there a script I could use that would make the content AUTOMATICALLY move to a new page when neccessary? Example: Page 1 can only have 30 tables. Someone adds 5 more tables to page one- CAUSING the older tables to be moved to another page. I can make the pages(page 1, page 2, page 3) beforehand, but is there a script that will let the content automatically go from page 1 to page 2 when page 1 is overflowing? Is the ANY way I could do this? Through PHP? or even Javascript? Hello everyone. I'm working on a website and I'm not quite sure how to do something. I'm hoping someone here might be able to point me in the right direction. The site will have content on each product page such as special deals, recent news or announcements. Each product page will also have their contact information. Now what I need to figure out is this. Since the "recent news" , "Special deals" and "Announcements" will be on every product page. I need to find a way to those things on every page at once. Just to show an example. Here's one of the practice pages: http://sbultimate.com/newsite/toeswitch.html If you scroll down you'll see the sample of Announcements, specials and news. That's the part I'm talking about. If any of you can help me learn how to do this I'd greatly appreciate it. Thanks. Ron I'm not sure how to explain this, but I hope someone can help me or point me in the right direction. I'd like to have a small side column on my website with content such as recent updates. Ideally, I'd like to be able change just one file and have that reflected on every page. Right now, I have to go through and update each page manually but I know there must be an easier way to do this. I'm thinking this is somehow related to RSS feeds but I don't really know much about them and I'm not sure if that's what I'm actually looking for. Can anyone offer any advice/tutorials/suggestions/help for a way to do this? The site I'm working on is located here and the section that I would like to be able to change that right column ("Recently Updated"). NewB question I'm sure and this seems like such a basic thing. I searched but didn't find this. I'm building a new site with a sidebar on the right. The page layout is the same for all six pages. In the sidebar I want to have latest news and events; dynamic content basically. I'd like to have that content in a separate file so that I only have to edit it in one place and then have it show up on each of the six pages. I'm relearning HTML and learning css and javascript now, but I can't seem to find a good way to do this. I've looked at link and iframes and I'm wondering if a script would be the way to go. I wanted to ask you all - what's the best way to do this that's standards compliant (XHMTML) Thanks for your help. Cheers, Maggie Hello, I'm helping a friend redesign a film website. Is there a way of making an area of content (such as a set of links in a menu bar) updatable so that if it is updated it will change across all the specified pages on the site? I am vaguely aware of templates in Dreamweaver CS3 and I think this would provide the solution, but my friend uses Frontpage and will be editing and creating content in that. Is there a way of using CSS to update areas of content? I know how to use CSS to update values like fontcolour and background images, but not areas of actual HTML content. Thanks for any help you provide. Introduction: Seeing as this question is brought up very often, I hope this short guide will be a destination for users seeking information about the topic. Although this is a server-side issue, those who are not aware of this fact generally seek help in HTML/XHTML, so this is where the topic will remain Note: Read the answers to Frequently Asked Questions in the next post! Hasn't this been done before? Absolutely; this is meant as a straightforward stickied version that brings a few things together and references previous threads where you can find further details. If your question is somewhere in the realm of one of these, you're in the right place: How do large websites manage their content? How do I make the same content appear in multiple pages without copy/pasting? How do I automatically update parts of different pages, without editing every file? How do I avoid duplicating code in multiple files? Is there an alternative to IFrames? The answer is using PHP Includes, SSI (Server Side Includes), or ASP Includes. Each will be discussed below. Basic Concept: Let's assume we have a basic HTML page with a few links that represent a navigation menu (we're using HTML5 markup for simplicity): Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Main Page</title> </head> <body> <div> <ul> <li><a href="home.html">Home Page</a></li> <li><a href="gallery.html">Gallery Page</a></li> <li><a href="about.html">About Page</a></li> <li><a href="contact.html">Contact Page</a></li> </ul> </div> </body> </html> This HTML page is now our basic template for subsequent pages that we create, which traditionally meant that we copy and paste our menu into each one. However, what if we end up creating 50 pages and then find out we have to add another link to the menu? Our only solution would be to add the link to each page. In order to avoid this, we separate our menu from the rest of the page like so: Code: <div> <ul> <li><a href="home.html">Home Page</a></li> <li><a href="gallery.html">Gallery Page</a></li> <li><a href="about.html">About Page</a></li> <li><a href="contact.html">Contact Page</a></li> </ul> </div> Save it in a file, and then place an include on every page where we want to display the menu: Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Main Page</title> </head> <body> code for including menu would go here </body> </html> This setup lets us update our menu file, and have the changes be immediately reflected everywhere we placed our include. The concept is most often used with things like menus, headers, and footers, but it can be used with anything and we'll now discuss how it's done in practice. Note: The attached zip contains working examples of all three methods. PHP Includes: General Requirements: Your web-hosting provider must support PHP, which most of them do. If your host does not support PHP, I would suggest switching hosts. If you do not have a hosting provider, and you're attempting this on your local computer, it must be set up as a local server and configured to run PHP. The easiest way to do this at once is by installing XAMPP. Required Filetypes: By default, servers will only parse PHP code inside files with the .php extension. Therefore, you must change the extension of any files you want to use includes in to .php (e.g. index.html becomes index.php). Although your main file must have a .php extension, you can include files with extensions such as .html, .txt, .inc, other .php files, and more. Syntax Here are two ways to include a file in PHP: PHP Code: <?php include('file_to_include.html');?> or: PHP Code: <?php include 'file_to_include.html';?> Note that you can also include full URLs if URL file-access is enabled in your server's configuration: PHP Code: <?php include("http://www.google.com/");?> Code Example: (some_page.php) Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>PHP Include</title> </head> <body> <?php include("menu.html");?> </body> </html> Server Side Includes (SSI): General Requirements: Your web-hosting provider must support Server Side Includes, which most of them do. If you do not have a hosting provider, and you're attempting this on your local computer, it must be set up as a local server and configured to support Server Side Includes. If you are using Apache, you can find information on enabling SSI here. If you are using IIS, you can install Server Side Includes inside Windows Features > World Wide Web Services > Application Development Features > Server Side Includes, although this path may differ depending on your version of Windows. Required Filetypes: By default, servers will only parse Server Side Includes inside files with the .shtml, .shtm or .stm extensions. Therefore, you must change any files you want to use includes in to have one of these extensions (e.g. index.html becomes index.shtml). Although your main file must have one of the above extensions, you can include files with extensions such as .ssi, .html, .txt, .inc, and more. Syntax Here are two ways to include a file using SSI: Code: <!--#include file="menu.ssi" --> Is used to specify a relative path, i.e. a path to your include in relation to where your main file is. The above assumes that your main file, and menu.ssi are in the same directory. Code: <!--#include virtual="includes/menu.ssi" --> Is used to specify a path relative to the web root. The above assumes that menu.ssi is located inside webroot/includes Code Example: (some_page.shtml) Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>SSI Include</title> </head> <body> <!--#include file="menu.ssi" --> </body> </html> ASP Includes: General Requirements: Your web-hosting provider must support ASP. If you do not have a hosting provider, and you're attempting this on your local computer, it must be set up as a local server and configured to support ASP. If you are using Apache, you can find information on enabling ASP here. If you are using IIS, you can install ASP inside Windows Features > World Wide Web Services > Application Development Features > ASP, although this path may differ depending on your version of Windows. Required Filetypes: By default, servers will only parse ASP code inside files with the .asp extension. Therefore, you must change the extension of any files you want to use includes in to .asp (e.g. index.html becomes index.asp). Although your main file must have a .asp extension, you can include files with extensions such as, .html, .txt, .inc, other .asp files, and more. Syntax Here are two ways to include a file using ASP (The syntax is exactly the same as SSI): Code: <!--#include file="menu.html" --> Is used to specify a relative path, i.e. a path to your include in relation to where your main file is. The above assumes that your main file, and menu.html are in the same directory. Code: <!--#include virtual="includes/menu.html" --> Is used to specify a path relative to the web root. The above assumes that menu.html is located inside web root directory/includes Code Example: (some_page.asp) Code: <!doctype html> <html> <head> <meta charset="UTF-8"> <title>ASP Include</title> </head> <body> <!--#include file="menu.html" --> </body> </html> My website is SalvationSource.com. I need somethings, around 15-16 done that I can't do. I have some money to give for this. Here is what I need done. 1. I need the website to auto adjust so it looks great in everyones IE and FF, no matter what resolution they are using. 2. I need it so when I change the index, it changes on ALL pages so I don't have to change it in 20 different pages, which has to do with the php include code, <?php include("index2.php"); ?>. Or maybe jsut have the body change and the header and footer change, kinda like this site, http://www.clubhabbo.net. 3. I need my 5 boxes having their own php file, with the php include code, but if its possible to have the 3 blue boxes information on each box to be included in the php file, and not just the information inside the boxes. 4. I need a "Bookmark This Page" button listed under the Home icon, I need it to be a button like on the left side of, www.danecook.com, since coding won't do it for both IE and FF, so when you click "Bookmark This Page" a box pops up with a button and logo adn such like his site. 5. I need the blue box behind the login boxes is aligned correctly, its always 1px off because of IE and FF my last coders said, but lets see if you can do anything about it. 6. I need the footer blue copyrite box fix at the top of it, its like 1px across the entire footer, theres a darker color cahnge, not sure why. 7. DONE! 8. DONE! 9. The template background is connected with the webpage background, I need that cut/fixed so I can add something on teh sides of the website. 10. I need a few pages made that will be PHP, such as the Statistics, Surveys, and Quizzes pages, and I'll need help with a few other pages such as the Store and Downloads page. For the Statistics and Surveys page, I want them just like the ones on this site. www.salvationsource.com/php. 11. I need the forums, www.salvationsource.com/forums skinned to look like my website, I have no clue how to make the forums look like my site, maybe we can just change the images or something, just needs to look like the website template. 12. I need a chat room like this one, http://chatterbees.homestead.com/chat_lounge_1.html, it doesnt have to be that advanced to where you can password your name so you and only you can use it and such, but it would be nice, I need one that resembles my website and such, I do need it to be able to allow people to PM other people. I guess this would be java and html. They charge like 100 for that chat room, but I'd like it as advanced as I can get it. 13. The login part on the home page, I need it so it will login into the forums and such, I need it to mainly, work. I believe I need a SSL Certificate and such which I am going to switch hosting providers and I get a free SSL Certificate when I do. 14. I need the forums, SSL, mainly everything to be able to be switched to new hosting, like if I needed to reisntall the forums, I can just upload the database file or something and all my categories and forums, and sub forums with all the posts and threads are there. So if you want me to switch hosting providers first before we start, please let me know. 15. I do need a toolbar like the mininova.org, and google.com toolbar, I will make the layout of how it should look in Photoshop, give me a little time. Of course it needs to work with IE and FF. 16. This is one of the last things I need which is the radio player, like this website, http://www.clubhabbo.net. As you can see it has the Windows Media Player player, and above that it says the radio stats. I of course need a better looking radio playe. I will also make it in Photoshop soon. But the main way it will look is like this, http://www.blavish.com/wp-content/up...mp3-player.jpg. And on it, it will list the Radio stats, and the 5 buttons on teh end will each do soemthing. Just give me a little time to make it in photoshop and to give you more detail on what each one does and such. I guess it would be best to be made in 3ds Max, or Maya or something, or made in flash adn imported into a modleing program and rendered 3d. Just the best look you can get, like with the like refecting off it and such, give me alittle time to get the detail. 17. I don't know if I really want this. It depends on if you all want to make it, I would love to have an admin control panel, just like phpnukes, to post news, ban IP's and people, add downloads, etc. Let me know what you think about that, because I know thats ALOT of work and I've already asked for ALOT. 18. I do need the PHP form on the contact us page to be modified, fill it out and as you see it makes you verify the data you entered, I don't want it to verify. I jsut want it to send you to a thank you page and have it email me as it does with the data and their IP and such. I just don't want it to verify. As you see I did the 2 I can. I have FTP and Cpanel and everything. If you'd like to make a little money then please reply. Can you save the pages you create from a .Master as HTML? Would you suggest a different format? It wants to save as aspx, but can't open that on my phone... Sorry if this has been posted before, I looked but couldn't find it. I am having serious problems with something I am trying to create. I am building a site which at the moment consists of 1 Page, namely my index.html page. I have put a lot of time and effort into the page and it looks fantastic, however, When the site goes live (school website) there will be a LOT of content pages. My dilema is, say for instance we want to add a new button on or change something on ALL the pages, it would take hours. I know in PHP you can do the index.php?page=departments....and I am sure I have seen it in HTML before. Therefore creating me a template which I only have to change 1 page and the rest will change automatically. This would help me SO Much. Thanks In advance Hi, I have a problem creating a Master page in dreamweaver, can anyone help me? I want to change my web layout and affect the rest of the pages. Regards Steve i have some softwares and i dont want to let the people download and save them to their computers. i just want that people should be able to install the software and use it, but they should be not able to have a copy of it. is it possibe to do so? i mean running the installation directly from the site. so that i can sale the cds of my programs. i have a idea to make my programs PlugIn. but i also don't know how to create them. or is there any other solution for this? if yes then let me know... anyone please help me out! thanks! Hi, Not sure if this is the correct forum for this question but I was wondering if someone could point me in the right direction for building websites not with .NET technology (ie .aspx etc) that allow you to do something similar like master pages and content pages. For example in .NET you can create a master page and then have content pages which automatically "link" to the master page so a header or template that you have in the master page is automatically kept and the content pages are just "loaded" into the contentDiv. I hope I'm making myself clear enough. One way I thought is maybe you create index.html and then all your links etc and header and footer and in the middle put a div. Then you can use javascript to set the contentDiv to whatever page you want with an iframe? Is that the correct approach? Thanks, SS This will be hard for me to explain so I will add an image: http://img75.imageshack.us/my.php?image=examplexu6.gif How do I go about loading a page within a page. For example, in the pic, if you clicked Cost it would load a page within the loading area without taking off to another location. I seen it on a site before, i remember the links were something like "/?p=cost" or something like that. And the page appeared to not navigate elsewhere, the cost page was just loaded within the page i was on. hope that makes sense, if so any examples on this? is it hard to do? messy? safe with most browsers? thanks Hi, Im trying to make my footer content align correctly to the main content when a window resizes. The apdivs don't seem to want to move at all even with a relative position etc. I have tried everything but just cant get it to work can someone help please? http://pjm.co.uk.uksite4.yourwebserv...splay&PageID=5 Also some one commented before on the amount of css and JS pages. These will al be stripped out as its an Open sources system im using! Thansk alot Joe Hey guys, I used to know a lot about html, but then just completely stopped doing anything with websites for too long. I was just wondering how I can replace a word or number with a specified word or number. What I want to achieve: I've got a forum with a couple thousand members and it's picking up in activity and I want to make some names stand out for being helpful. I want to replace their names with an image. But to do so, it'd have to be a code made and added into the footer template. Because obviously I can't edit a username for html image code. So I just need the code to find all instances of a certain username and replace it with what I specified. ------------- Man I really wish I remembered how to do this haha. Thanks guys. I'm currently making a new layout for my site and before it will go online, I want to set all my pages on a BRB page/status (customized with my own brb logo+text etc.. Anyway I can do this? If this is in the wrong section sorry, i have been thinking of adding a new page to my site and added sky sports, but how do i set up a page that opens another web page right away? |