Coding

Although FrontPage 2003 provides a number of tools that keep you from having to code elements of your site, the product also provides a solid toolset for the times when direct hand coding is required.

Essentially with FrontPage 2003, it is totally up to you to choose whether you want to code your Web site or let FrontPage do the work.

Working with Code View and Split View

The Code view in FrontPage 2003 has been considerably enhanced with additional formatting and tool options that are examined further in this section.

graphics/new_icon.jpg

New to FrontPage 2003 is the Split view, seen in Figure 2.24. This view splits the screen in to both the WYSIWYG Design view and the Code view, allowing the user to see how code directly affects the HTML design and vice versa.

Figure 2.24. Split view shows the direct relationship between HTML code and content created in the FrontPage design view.

graphics/02fig24.jpg

For a more detailed look at Code and Split views, see "Working in Code View and Split View," p. 519.


The Quick Tag Editor and Code Snippets

graphics/new_icon.jpg

Two additional tools that assist the coder in FrontPage 2003 is a Quick Tag Editor, seen in Figure 2.25 and the Code Snippets tool, seen in Figure 2.26. The Quick Tag Editor allows the developer to edit specific elements of a tag, and the Code Snippets tool provides the developer a means to insert predefined code elements in to the Web site through a simple interface.

Figure 2.25. You can quickly edit the contents of any tag while in Design, Code, or Split view using the dropdown options associated with it.

graphics/02fig25.jpg

Figure 2.26. The Code Snippets tool lets you quickly insert elements of code in to your Web site.

graphics/02fig26.jpg

For a detailed look at the Quick Tag Editor, see "Editing Code with Quick Tag Tools," p. 529.


For a more significant examination of code snippets, see "Using Code Snippets," p. 543.


Optimizing FrontPage's HTML

graphics/new_icon.jpg

The combination of code produced by FrontPage and edited or inserted by a Web developer can produce interesting results. Most developers want to provide the cleanest possible HTML at their Web site, and FrontPage 2003 provides a series of HTML optimization tools to provide this feature set. One of the most powerful tools, the Optimize HTML tool seen in Figure 2.27 provides a means to quickly optimize the HTML on any page in your site with the click of a button.

Figure 2.27. The Optimize HTML tool lets you decide which elements of the HTML you would like cleaned.

graphics/02fig27.jpg

This is different from the optimize at publish feature discussed earlier because it gives you the ability to go in and update already existing pages directly through the FrontPage interface. This is ideal for the user with an already existing Web site or for someone who updates (or builds) his site directly, bypassing the publishing process. Unnecessary comments and whitespace, as well as unused content and FrontPage generated HTML, can be removed quickly and easily.

For information on the other tools provided for cleaning and streamlining FrontPage HTML, see "Optimizing FrontPage's HTML," p. 549.


Working with VBA and FrontPage

Coding is not just limited to the Web server or site content. Microsoft's Visual Basic for Applications language is ideally suited to adding capabilities directly to the FrontPage product.

If you need to extend the power of FrontPage to perform specific tasks for you on a regular basis, you can write such functionality in VBA and quickly integrate it into FrontPage.

A quick Google search will find numerous sites around the Net that offer FrontPage Macros written in VBA that complete simple tasks such as removal of FrontPage meta tags or transferring FrontPage content to Outlook for easy emailing.

For more on working with FrontPage and VBA, see "Working with VBA and FrontPage," p. 567.




Special Edition Using Microsoft Office FrontPage 2003
Special Edition Using Microsoft Office FrontPage 2003
ISBN: 0789729547
EAN: 2147483647
Year: 2003
Pages: 443

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