HTML - General Content Updating
Hello,
I'm going to be updating an HTML website for a friend, and it's going to be a very basic webpage. Mostly HTML with a little JavaScript thrown in for fun. My question is, how do I handle content management for the user? The website is going to be a standard setup with a "New Information" section on the homepage. This section will be updated by the admin (my friend) on a regular basis, but I'd like to be able to have her update this info in a more user-friendly manner than updating the actual HTML code. Content management is new to me, so I'm open to any suggestions. Thanks in advance! Similar TutorialsIm not sure if this an html, php, or javascript question but here goes. I am trying to set up a place at my sight where I can have a content page from a certain link update automatically. For example, I want to create a 30 day journal link where each day a new journal page would come up. To my understanding I know I would have create a folder that would have 30 separate html pages. But my question is how can I set up the site that each page would automatically update according to day and time. Let's say that at 12:00am midnight a new html page with new content would be available for the reader. I don't have a lot of time to manually update the link with new content, so I want the site to do it on its own each day. Am I making any sense? I just need to know how I can have content automatically update each day without my needed to go and do it manually every day. Any help would be appreciated....thx so much. 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 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> In preparing to learn in-depth info about DW and all the terms that come with web designing: What exactly does the term slide toggle mean? I came across this term, in one of the threads, and googled it but still did not understand the term. I was suprised to see that DW has a few critics out there. With each type of programming language, I gather that there are pro's and con's for each but specifically, what are the con's to DW? I invested in CS5 and I am looking forward to working with php and MySQL in conjunction with DW. Thank you in advance! Hey, I have my own website. I thought it was all looking fine but I use mozilla firefox, so I tested my website out on Internet Explorer 7 and found some errors. I have sorted them all out apart from one. I have a table with 3 rows, I need the first and third to be about 15px wide and the middle to be the rest of the page. I can do this but when I set the table border to 1 it all looks fine. I set the table border to 0 and it all squeezes in to be about 100px in width. What I need to know is there a way to keep the border but make it invisible if you know what I mean, not setting the border to 0 but to keep it at 1 but making it not visible. Or of course any other way. Thanks in advance. Tom. well not really sure if it would be html or more in the lines of css but 1st just wanna say sorry for brining up myspace again but is there a way to hide the comments from the page source as well as just the actual page that's viewed? Ok, please bare with me because I know I probably sound really stupid. I have bought a domain at freewebs.com, and I am pretty good at making graphics so I figures making a website wouldn't be that hard....well I was wrong. Anyways I am making the layout, but how do I code that into actually becoming the main page? And then once I do that how am I suppsoed to edit it to do news updates etc? I'm so lost it's ridiculous. Any help is appreciated! Tyler Hi guys. I'm working on a website, using ASP.NET. I'd just like to find out if there is anything specific that all websites should have, i.e. an about page with information about the owner and author of the site. Anyone have some advice? Hi This is my first post and hopefully I am in the correct place to receive some help. I am totally unsure how to layout my page correctly. Firstly, is there a recommend width, and if so I do I correct the script accordingly. I seem to have different cells at various widths and do not know to to correct. Essentially, the page needs headers and footers covering the whole width, with 2 cells for text and picture in yhje main body section. What I am attempting to do is add text to the cells with images so as the images stay in place and the text wraps around the image. I would be grateful if someone could take time to look at the page script and make some recomendation towards improvement in the layout, or better still post back somre changes. This is my site http://www.janitorman.net/rions/info.htm I hope I have explained with enough detail. Regards Ludo Hi, How can i change the source code of my home page? You can modify the source code and save it as a .txt and then again as some other file type, which I can't remember, So that the off line page is whatever you want it to be, Say if I want to change the color or edit the text of MSN etc. Your "Homepage" refers to a file in your system and not on the web, Unpublished. Does anyone know about this? A computer science professer showed me a few years ago. Happy New Year If you were looking to host a blog, and nothing else on that domain, would you go for one of the companies that only host blogs and that are semi set up with templates and so on? Or would you just go for your own hosting and set it all up yourself? __________________ hi im a newbie in this forum and i would like to know 2 things can someone explain what is the different between this 2 code: this code normally appear on the top or the first line on html code ( before <html> tag ) THIS: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > AND: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> what is the advantage or disadvantage between both. will it make any different for users or search engine? thanks This is the site in question: http://www.kzoo.edu/ultimate/home2.htm I'm pretty bad at HTML but I've been making due with various guides and such so if you're actually looking at the code it's probably really messy. -I'd like all of the links on the left to be fixed, so that scrolling down and such doesn't affect their movement. How could I do that? -I'd also like the "last updated" on the bottom to be fixed, but I'd also like it so that it's always on the bottom regardless of what resolution you're using. How could I do that? -Finally, I want to figure out how to enter text in a paragraph in the center of the page without affecting the location of the links on the left. I tried using the center tag and such, but it would create a new line and mess up the spacing on the left. Thanks. Hello My name is Beth. I was given the difficult task of creating a website for a company I work very close with and I'm running into all sorts of coding problems. I know these can't be that insane but I've been spinning my wheels on these issues for 2 weeks now and I'm almost out of time. I know it's not much but I will paypal $50 to the person that solves my problem (that is if its not against board policy) i just NEED help so bad! Here is where my demo page is for the new website. It's one page, no links to anything else... URL: http://www.srh.com/taxgirl/index.htm The page is supposed to look kinda link this... The problems a 1.) The drop down navigation has issues displaying over the flash animation sometimes flashing above it but it seems like it naturally wants to be below it. 2.) When you hoover over the navigation the buttons disappear, this might be due to the same problem as #1 but I don't know... 3.) the two columns need to fill down as either one has content. what i mean by this is that if the column on the right has 800pxs of content and the left only has 300px it should still extend 100% with the growth of the right column. Any advice anyone has on this kind of layout I would appreciate massively.. but honestly, I'm so out of time I'd absolutely be ecstatic over a solution. Like I said, I have $50 to offer for help. Please look into your hearts and minds to help! Thank you so so much. ~beth. 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, all. New user here, but you looked like the friendliest bunch of people discussing web dev. Here's a simple question (I hope): I want to query the Navy's public site for moon cycle/period information from within my own code. There's a page (here) that provides a form to get what I want per day per location. But when I pull out the form info from that page source and place it in my own page, the form doesn't work. Is this a workable approach? An alternative would be to use another form on the same site (here) that results in a table of info for a whole year's worth of data. I could go either way as parsing either table is pretty straightforward for me. Since the forms are similar, it seems like getting on of those forms to work at all is the crucial issue, or is there another way to query data on the net like that? Thanks in advance, Burt Hi guys, hope you can help with what I'm hoping will be a simple answer! I'm just developing a small web app using XML as a basic data source. The XML data simply populates an event listing and news page etc. I need the client to be able to add new events and new news stories etc themselves and was wondering if there was a way for him to do it without editing the XML file directly?? Previously, I've used an MS Access database and I've had a basic asp input or update form to add info to the database, but I guess it doesn't work this way with XML. XML seems an extremely easy way of storing, retreiving and displaying small amounts of data in this way, and wanted to avoid having a content management system for the client. Any help would be greatly appreciated!! Kind Regards Gaz Hi everyone I'm currently told to design a html page that updates live(Constantly changing) data, I wonder if it is possible through html coding. Lets say the data updates every 2 seconds, as in the page changes the data without me manually refreshing the page. Is it even possible in the first place? Sorry, but I'm kinda new to html code writing and all. Sorry haha. Hey, I have made an HTML-based iPhone theme that is a calendar (screenshot attached). My problem is that the HTML has to be reloaded in order to update the date, and that requires restarting the device. I would like the date to update automatically. Unfortunately, I do not know HTML beyond the minimum to get this working. I tried some javascript functions on timers but I can't get it working. The files are attached. How can I make it update itself? Thanks! P.S. You can load the HTML file on your computer, it just won't have the background or icons or anything. Hey I have been asked to design my schools website which involves information from each department i.e. computing, maths, English, ect.. that needs to be included in the site. I would like for the departments to be able to change there information on the site from within the site instead of having to open a html editor and changing the text there then having to uploading it back up to the site. Is there a way that the text can be changed on the site, kind of like wikipedia, but with a html code? Cheers |