Article ID: 161577
Article Last Modified on 5/11/2006
APPLIES TO
- Microsoft Visual SourceSafe 5.0 Standard Edition
- Microsoft Visual SourceSafe 6.0 Standard Edition
This article was previously published under Q161577
SUMMARY
This article explains how to include the last update time, the name of the Web page, and other similar items in HTML files on the World Wide Web. You can automatically include these items through keyword expansion when you use Visual SourceSafe. You can also enter other items as regular comments so that they only appear in the source of the HTML document.
MORE INFORMATION
Setting up keyword expansion for HTML files is slightly different than using keywords in regular source code files like those used in Visual C++ and Visual Basic.
Enable Keywords for Web Documents
- Start the Visual SourceSafe Administrator.
- On the Tools -> Options menu, click the General tab.
- In "Expand Keywords in Files of Type," type: *.HTM, *.HTML, *.HTX
- Exit the Visual SourceSafe Administrator and restart the Visual SourceSafe Explorer.
You can use any keyword. However, because several keywords append historical data to files, the following keywords are recommended:
For external viewing: $Date: $ $JustDate: $ $Modtime: $ For internal documentation: $Author: $ $Archive: $ $Log: $ $Header: $
Add Keywords to HTML Files
To add a keyword for external viewing, use the following syntax:
<!-- $$KeyWord: --><!-- $ -->
for example:
<p>Last Updated on: <!-- $$JustDate: --><!-- $ --></p>
The following prints out on the Web page when the .htm file is opened with a Web browser:
Last Updated on: 1/1/96
To add a keyword for internal documentation, use the following syntax:
<!-- $KeyWord: $ -->
This command acts like a "regular" keyword in that the expansion is only visible when you view the .htm file in a text editor.
Note that any keyword that you want to display externally in HTML documents must be preceded by $$. :
REFERENCES
Microsoft Visual SourceSafe Help: HTML Keyword Expansion
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
(c) Microsoft Corporation 1996, All Rights Reserved. Contributions by Brian Matsik, Microsoft Corporation.
Keywords: kbhowto KB161577