Adding a Date Automatically


Sometimes, you might need to keep track of the date you last modified a page on your site or you might want your visitors to see when the information on your page was last updated. Dreamweaver lets you place a date and time on your pages to track this information. Dreamweaver can update the date and time automatically every time you save the page using Dreamweaver, so you don't have to do it manually.

Note

This date is not a dynamic date that changes according to the date and/or time a user accesses the page. This date simply tells your users when your pages have been updated. Dynamic dates that display the current date and/or time are often generated with JavaScript. You can learn more about JavaScript in Lesson 8.


1.

Place the insertion point at the end of the copyright information paragraph, insert a line break and enter Updated:.

This information is often shown in the upper-right corner of news sites or displayed at the bottom of a page on other informational sites.

2.

Select the Common category in the Insert bar and click the Date button to place the current date on the page.

Tip

You can also choose Insert > Date to open the Insert Date dialog box.

The Insert Date dialog box opens.

3.

From the Day format menu, choose the Thursday option. From the Date format menu, choose March 7, 1974. From the Time format menu, choose 10:18 PM. Check the Update Automatically On Save checkbox to update the date on your page each time you save your document. Click OK.

The current day, date, and time are displayed, and this information changes every time you save the document. Thursday is used as an example in the Insert Date dialog box of how the day will appear in your document. The date and time are also examples.

Note

If the date is set to update automatically, you can change the format at any point after inserting the date. To change the date format, click the date in your document and click Edit Date Format in the Property inspector. The Insert Date dialog box opens. Make the appropriate changes and then click OK. Your changes are applied to the document. The format of dates that do not update automatically can't be edited through the dialog boxto update such dates, you will have to delete and reinsert the date or change the text yourself in the Document window.


You can save, preview, and close the index.html document.




Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net