Insert FrontPage Includes in Microsoft Expression Web 2.0 and 3.0

Posted by: Minal Agarwal , on 9/6/2009, in Category Expression Web
Views: 25095
Abstract: If you have content that is repeated on many or all the pages of your web site, you may want to use FrontPage Includes or Server Side Includes. Includes allow you to create a page with content that you want to repeat on multiple pages and Include such file in all your pages. Let us learn about to insert FrontPage Includes in Expression Web 2 and 3 in this article.
Insert FrontPage Includes in Microsoft Expression Web 2.0 and 3.0
FrontPage Includes were not available in Expression Web 1.0 but Microsoft has included them in Expression Web 2.0 and now in 3.0. In Expression Web 2.0, Includes are available as a command that needs to be added on the toolbar using the Customize option in Tools menu. In Expression Web 3.0, Microsoft has added it to the Standard toolbar.
What are FrontPage Includes and why do we need them?
FrontPage Includes or Design Time Includes may sound something really serious and difficult, but believe me they are very convenient to use.
Let us consider an instance where you are building a site. You have already created 5 pages but they are growing to four times that many. There is a left column on all the pages, with numerous navigation links, same across all the pages. Well you have managed to copy the same code and paste it in all these pages. Now let’s say, you want to edit some links. Wouldn't it be quite a task to open each page and update it? Obviously, you have better things to do!
By using Includes you can minimize this effort. You can add these common navigation links in a page and then include this page in all your other pages in the web site. And whenever you want to make any changes, open this page, edit and all the other pages would be automatically updated.
You can choose to use various Includes like Server Side Includes (SSI), FrontPage Includes, PHP Includes, ASP Includes, AJAX Includes, RSS Includes and many more. Design Time Includes and Server Side Includes serve a similar function. SSI tells the web server to follow directives and merge into your document before it is displayed on the browser, it does not allow us to view what is happening, at design time. But FrontPage Includes could be seen at design time and hence are more helpful. Both SSI and FrontPage Includes can supplement the common content you have in Dynamic Web Templates (DWTs) or Master Pages.
How to add FrontPage Include Pages option in Expression Web 2?
As I mentioned earlier, Microsoft has made Includes available in Expression Web 2 through the Customize – Commands pane. Let us see how to get the option on your Standard toolbar so that it resides there and you can use it whenever required.
1.    Go to Tools > Customize.
2.    In the Customize window, make sure the Commands tab is highlighted.  
3.    In the Categories section, choose Insert and browse through the Commands list in the next section. Select ‘Include Page…’
4.    Drag the command and drop it over the Standard toolbar. Click Close.
5.    The command would now always be there on the Standard Toolbar; unless you choose to remove it.
NOTE: In Microsoft Expression Web 3, the ‘Include Page…’ option is readily available on the Standard toolbar and in the Insert Menu.
How to use Includes in Microsoft Expression Web 2 and 3?
1.    Open the web site where you want to include the page.
2.    To create a new page, click New button on the Standard Toolbar on choose File > New > HTML.
3.    Add the content you want to repeat on the pages in your web site. For example, I have created few links as show here:
Save the page with a relevant name, for example: ‘navigation.html’.
4.    Now open the page in which you want to include ‘navigation.html’. In this example I have created a page called ‘includes_demo.html’. Place your cursor where you want to add the navigation links and then click on ‘Include Page…’ button on the Standard Toolbar. (See image below)
5.     ‘Include Page Properties’ window would be prompted.
6.    Browse to the location of the file or enter the path to the page and click OK.
7.    As soon as you do this, you can view following code in the Code view of your page.
<!--webbot bot="Include" TAG="BODY" U-Include="navigation.html" -->
8.    In the Design view of ‘includes_demo.html’, you would be able to see the navigation links added from the Include page ‘navigation.html’. See image below:
9.    In case you want to modify these links, make necessary changes in the ‘navigation.html’ and save the file. The changes would be instantly reflected in all the pages that have included this page.
NOTE: A FrontPage Include/Design Time Include is processed by Expression Web during the design time and not by FrontPage Server Extensions (FPSE) and hence FPSE support is not required.
Can we have multiple FrontPage Include files in a single page?
Yes, of course! You could have a header, a navigation bar and footer in a page, all coming from different Include pages. Just make sure you have different containers to place content included from these files.
1.    Plan your page layout before you begin. This way you will get an idea of what and how many Include pages you can create.
2.    Organize your Include pages in a folder and name them clearly according to their function.
I hope you enjoyed reading this article and I thank you for viewing it.

If you liked the article,  Subscribe to the RSS Feed or Subscribe Via Email

This article has been editorially reviewed by Suprotim Agarwal.

Absolutely Awesome Book on C# and .NET

C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.

We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).

Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.

Click here to Explore the Table of Contents or Download Sample Chapters!

What Others Are Reading!
Was this article worth reading? Share it with fellow developers too. Thanks!
Share on LinkedIn
Share on Google+

Minal Agarwal, Expression Web MVP, MCDST, works as a freelance web designer (SaffronStroke) working on Expression Web, Photoshop and other Graphical tools. As a hobby, she also runs a famous Food site called Follow her on twitter @ saffronstroke

Page copy protected against web site content infringement 	by Copyscape

Feedback - Leave us some adulation, criticism and everything in between!