|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
|
| Keyboard shortcuts | Recommended Links
Although sold as an easy tool to create WebPages (and it can work in this role perfectly well), FrontPage like some other Microsoft products has a second dimension: it can serve as a powerful and rather inexpensive (compare its price with DreamWeaver) professional tool.
Actually FrontPage is a very complex professional Web authoring software and it takes years to learn to do certain things efficiently in it. No amount of documentation can explain all the interesting/practically useful combinations of facilities that arise (may be sometimes inadvertently even for the designers of the program) in a particular version. What is good in most cases those new capabilities survive in later versions.
Despite my almost ten years experience with FrontPage I periodically find a drastically better ways to perform some common operations, that would save me dozens of hours if I knew them before.
That where Tips came into play :-)
Notes:
Besides the font type, size, and color, and word wrap, the other attributes you may want to change in order to make your code more readable are are spaces and line breaks. The Code Formatting tab of the Page Options dialog box contains such controls:
Allow Line Breaks Within Tags Tells FrontPage to break lines, even if the break occurs within a tag, which might make code difficult to read. On the other hand, it means you won't have to scroll horizontally in order to read all of a page's code.
Tab Size And Indent Controls how much code is indented. Indenting makes it easier to read the attributes and values that follow a command.
Right Margin Specifies how much the code is indented from the right. A narrow column of code enables you to see other panes within the Front Page window, or other windows such as Web browsers.
Tags This box lets you apply line break settings to individual tags. Breaking a line of code after a tag doesn't affect the contents of the Web page, but it helps you locate a particular segment of the page's code more quickly. For instance, breaking the line after the <script> and </script> tags lets you quickly see all of the code contained between them.
One of the most powerful controls on the Code Formatting tab enables you to base the formatting of all the code that FrontPage presents by basing it on the formatting of the current page. Once you have adjusted the code so that it looks the way you want it to, click the Base On Current page button to make the same settings apply to current pages as well. Such consistency enables you to instruct your co-workers to look for the same elements—"look for the green comments within the HTML code," for instance.
By default HTML code in code view is not wrppped: it extends off the screen to the right. You have to scroll to view it. You can change this by activating word wrap: choose Tools, Page Options, and then click the General tab. Check the box next to Word Wrap, then click OK. The General tab also lets you de-activate line numbers, the selection margin to the immediate left of the lines of code, and automatic indenting of scripts or HTML, so that new lines in the Code pane are aligned with the line above.
The problem can be solved using search and replace with regular expressions for this purpose.
Regular expressions like:
width\=\"\[0-9]+\"
do the trick of removing (replacement should be empty).
CONTROL WEB PAGE DEFAULT SETTINGS
As users of Microsoft Word are probably aware, every time you create a new document, Word bases that document on a template called Normal.dot. This template includes such information as the default font Word uses and the standard margins for pages. What you may not be aware of, however, is that Microsoft FrontPage uses a similar template whenever you create a new HTML document. By modifying this template, you can control many of the default settings on your HTML pages. In this article, you can see where FrontPage stores its template and how you can edit it:
Activity Shortcut Keys Create a hyperlink
CTRL+K
Display HTML tags
CTRL+/
Create an AutoThumbnail of the selected picture
CTRL+T
Preview a page in a Web browser
CTRL+SHIFT+B
Display the Microsoft Script Editor
SHIFT+ALT+F11
Create a new page
CTRL+N
Bold
CTRL+B
Italic
CTRL+I
Underline
CTRL+U
Copy
CTRL+C
Paste
CTRL+V
Undo
CTRL+Z
Save
CTRL+S
CTRL+P
Open
CTRL+O
To link an external style sheet to a page, select the Format/Style Sheet Links menu. The Link Style Sheet dialog box will list your currently available style sheets. If there aren't any style sheets in the list, you can click the Add button to reference a file from anywhere in your current site, your hard drive, or the Internet. After you've added one or more sheets to the list, select the ones you would like to link and click OK.
You can also choose to link your style sheets to a few pages or all the pages in your site.
You can change the title of the page in the folder view. In the Folders view, click on a page or file to select it, then click its title. An edit box will appear that allows you to type in a new title for the page. This same procedure also lets you alter the file's name and comments. In addition, while the edit box is still activated, you can use the Ctrl-arrow keys to move the box around to edit another file's attributes.
One of the best new features of FrontPage 2000 is the Visual Basic for Applications Macro Editor. Macros can be a great help in applying a number of repetitive tasks. The only problem is that after you create a macro you have to go through a series of menus just to access it, which defeats the purpose of the shortcut. Expanding a bit on the previous tip, FrontPage will let you create your own custom macro button.
Select Tools/Customize and click the Commands tab. Click the Macros category and then drag and drop either the Custom Menu Item command to a menu or the Custom Button command to a toolbar. Right-click the command. On the pop-up menu type in a new name for the command, then select Assign Macro. Choose a macro from the Macro dialog box, and you've got your new macro button. You also can change the icon for the button by right-clicking it and selecting either Change Button Image or Edit Button Image. Change Button Image displays a selection of 48 pre-made icons from which you can choose. If you don't like any of those, the Edit Button Image function will let you actually create one of your own.
FrontPage 2000 now includes support for the Visual Basic for Applications (VBA) language, which has become so popular because of its widespread use in Microsoft Office. With VBA, you can automate tasks, manipulate different aspects of your Web project within the VBA programming environment, and create your own commands. As an example, here's how to add a Save All command to FrontPage that will allow you to save every open page in a project with just one click.
First, start the Visual Basic Editor (VBE) by selecting the Tools/Macro/Visual Basic Editor menu. Insert a new module by selecting the Insert/Module menu. In the Properties window (located on the left side of the VBE window), change the name of the module to SaveAll. Now, in the module code window that opened up when you inserted a new module.
To add the new command to the File menu in FrontPage, choose Tools/Customize to open the Customize dialog box. Under the Command tab, select Macros from the Categories list. Drag the Custom Menu Item item from the Commands list onto the FrontPage File menu and drop it beneath the Save command. Next, click the Modify Selection button in the Customize dialog box, and a context menu will appear. Type Save All in the Name field and then select Assign Macro. In the Macro dialog box, select the Save_All macro and click OK. Close the Customize dialog box, and your new Save All command appears in the FrontPage File menu.
When creating a hyperlink, FrontPage shows you a list of all the folders and pages in the current site. You can bet to specific bookmark by highlighting the page you want to link and clicking on bookmarks option in the menu.
Download details Office 2000 HTML Filter 2.0 The Office HTML Filter is a tool you can use to remove Office-specific markup tags embedded in Office 2000 documents saved as HTML.
Title is visible from Filder view properties and can be changed in this view without going to html.
Verify and Repair Broken Hyperlinks FrontPage includes a tool that allows you to verify the hyperlinks used in a web. These hyperlinks include links to other pages in the current web and pages in other webs, as well as links to the components of a Web page, such as graphic and sound files.
Optimize HTML option works not only in code view but also from Tools/Optimize HTML. You can also to grag it to it to a toolbar.You verify hyperlinks in Reports view. When you select the Verify Hyperlinks button on the Reports toolbar, the view changes to display external hyperlinks as well as internal, broken hyperlinks. Broken, internal hyperlinks appear with a broken chain link and the text Broken in the Status column.
You can repair the hyperlink itself in the Edit Hyperlink dialog box. In this dialog box, you can choose to change the link in all Web pages or only selected ones. You can also repair a hyperlink by opening the page containing the broken link in Page view. After the link has been fixed, it is removed from Reports view or a green check mark and the text OK appear in the Status column.
Folder List accepts multiple selection: You can select multiple files in the filer list by pressing Ctrl while clicking on each of them. After that certain operating can be performed on a group (opening, search, cut&paste, deletion, etc).
Blocking short menu: Initially, FrontPage's short menus only display the standard commands, and, as you work, the program automatically adds the commands you use most often. If you don't like this automatic customization, you can turn it off by selecting Tools/Customize, clicking the Options tab, and deselecting Menus Show Recently Used Commands First.
Navigation Tip. After invoking of bookmarks screen (Ctrl-G) you can click on any bookmark: that's equivalent to using goto operation.
Single space line - Press the 'Shift' + 'Enter' keys simultaneously at the end of your text for a single spaced line break.
Make a Hyperlink Open in a New Window - In hyperlink properties, click on the little pencil (target frame) and choose 'new window' from the common targets which will insert the '_blank' target setting in your page.
Find and Replace has been enhanced in Microsoft FrontPage 2003, and now includes regular expressions.
You can search one document or a group of documents or all the files in your web without opening each individual page to quickly find and replace content or even HTML.
To search multiple files you need to select onlythose that you want to analyse. You can also tab between Find and Replace.
To use the enhanced Find and Replace in a page or across your entire Web site, open a new or existing page or Web site in FrontPage 2003 and do the following:
- On the Edit menu, select Find or Replace.
- In Find where:, select where to search by clicking Current page, Selected page(s) or All Pages.
- To find and replace content, click the Replace tab, enter your text in Find what:, and Replace with: and click Replace All or Replace.
Tip To search Selected page(s) multiple select more than one Web page or file to search. In Folder List view, press the control key and left-click (CTRL+Left-click) on each file to select it. Then open the Find or Replace dialog to search only on the selected files. Make sure you select Selected page(s) under Find where: before doing a replace.
For more information about the Find and Replace, see Microsoft FrontPage 2002 Help.
FrontPage provides a nice way to find and replace text within all the pages in a Web site. This is a great feature for changing the name of a product or some other text that might be found on many pages in a site, but what about the underlying source code?
You can find and replace HTML in all the pages in a site or in a selected group of pages. To limit your global changes to a group of pages, first go to the Folders view and select the pages you want. After that, the procedure is the same for processing all the pages in a site. Select the Edit/Replace menu to bring up the Replace dialog box. Type the code you want to find and then the replacement code. Under Search Options, choose either All Pages or Selected Pages. Be sure to also select the Find In HTML option. Click the Find In Web button to find every occurrence of the code you're looking for. Then click the Replace All button, and every instance of your code will be replaced.
You can use this technique to change anything in the underlying source code of a page, including tags, attributes, values, comments, and scripts. It's also very helpful for changing email addresses or any other hyperlinks.
Tip #16 - Inserting an Existing Web Site into FrontPage You can import an existing web site into FrontPage, make edits and then republish the web site to your web server. To import an existing web site, follow these steps:TIP #7: CORRECTING LINKS OF AN IMPORTED WEB TO REFER TO THE URL RATHER THAN A NETWORK DRIVE
After you Import a web, edit your pages, and republish the web to the Web Server mapped as a network drive, you may find that your hyperlinks point to the network drive as opposed to the appropriate URL.For example, you may find that your links look similar to Y://folder_name rather than to a URL such as http://www.ee.psu.edu/acadaff/ (for Electrical Engineering's academic web pages) or http://www.ie.psu.edu/courses (for Industrial Engineering's course web pages) or http://www.engr.psu.edu/www/trg (for our training pages).
This is a problem since visitors who aren't mapped to the network drive will get a "Page not found" notice when they follow your links.
To correct this, select the 'Edit' menu and then choose 'Replace'. In the Find text box, enter 'file:///Y://trg/' (substituting Y: for the letter of the network drive and the appropriate directory). Using the Electrical Engineering example above, you would enter 'file:///Y://acadaff/'. For the Industrial Engineering example, you would enter 'file:///Y://courses/'.
In the Replace text box, enter 'http://www.engr.psu.edu/www/trg/ (substituting the URL to your web space given to you by your web master). In the Electrical Engineering example, you would enter 'http://www.ee.psu.edu/acadaff/'. For the Industrial Engineering example, you would enter 'http://www.ie.psu.edu/courses/'.
This action will replace all links pointing to the network drive to URLs and therefore, allow your links to be followed by all visitors, regardless if they are mapped to the network drive or not.
TIP #8: EDITING HYPERLINKS WHEN SPELL CHECKER HAS IDENTIFIED TEXT AS MISSPELLED (All Versions)
If your hyperlink text triggers the spell-checker the text will get a red squiggly line under it and when you right mouse click on the link, you'll see spell checking options but not the hyperlink options.
To edit the hyperlink, highlight the hyperlink text and press Ctrl + K. This will open the Insert Hyperlink dialog box and you can edit your hyperlink.
TIP #10: REDUCING THE SIZE OF GRAPHICS IN YOUR WEB (All Versions)
Tip #13 - Adding Keywords to Your FrontPage Web Pages (All Versions)Here are four ways you can reduce the size of graphics in your web and consequently, decrease the download time of your web pages:
1. Cropping the Graphic
- In Normal View, click on the graphic to select it and from the Pictures toolbar (View menu, Toolbars, Pictures), select the Crop icon. A "Crop box" will appear on your selected graphic.
- Drag the handles of the crop box to include the area of the graphic that you want to keep.
- Click on the Crop icon from the Pictures toolbar to remove the areas that are outside the crop box.
2. Resize the Graphic Proportionally
- In Normal View, click on the graphic to select it and place your cursor on one of the four resize handles that appear in the corners of your graphic.
- Drag one of the resize handles inward.
- From the Pictures toolbar (View menu, Toolbars, Pictures), select the Resample icon. This will reduce the size of the file/web page.
3. Create a Thumbnail for your Graphic - A thumbnail is a smaller version of the graphic that a user can click on to see a full sized version of the graphic.
- In Normal View, click on the graphic to select it and from the Pictures toolbar (View menu, Toolbars, Pictures), select the Auto Thumbnail icon. You will see your graphic change to a thumbnail.
- Save your page and select the Preview tab.
- In preview, click on the thumbnail and a full sized version of your graphic will display.
4. For GIF Images, you can use a graphics editing program to reduce the number of colors in the graphic. If you reduce the number of colors from 256 to 32 (or even 16), often the reduction in the number of colors is unnoticeable but the size of the file is greatly reduced. Also, you can set your graphics program to store GIF graphics in an interlaced format and this allows visitors to see a blurry version of the image while it is still downloading.
To make your web pages more accessible to search engines, you can add Keywords to your pages.
Here's how:
1. From the File menu, select Properties and then click on the Custom tab.
2. Under the User Variables section (second half), click the Add button.
3. In the Name box, type "keywords".
4. In the Value box, type the index keywords for your web pages separating each keyword with a comma.
5. Click Ok and Save your page.
Tip #17 - Using the Find and Replace Feature to Search and Replace HTML Code in Web Pages
When you work with web pages in HTML view, you are only working with a representation of the actual HTML code for the page (not the actual HTML code as it appears when the page is saved to the file system). For this reason, it is not recommended that you use the Find and Replace to perform bulk, HTML code editing because you may not find all the web pages that contain the code/tag for which you are searching. To work around this, search for a tag without the closing tag indicator, such as <body rather than <body>.
Tip #20 - Using Page Templates and Web Site Wizards (Versions 2002 and above)
Page Templates
You can use Page Templates to quickly and easily create web pages. You can make changes to your created pages based on page templates to suit your purposes. Here's how to create a page based on a page template:
Note: For additional templates (including those for other MS Office programs), please visit: http://office.microsoft.com/en-au/templates/default.aspx.
Copyright © 1996-2007 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: February 28, 2008