It is suggested that you read our previous article on developing your main FrontPage Includes. The previous article (Developing FrontPage Includes Tutorial) is a primer for this one on Nesting FrontPage Includes.
Now that you've developed your primary FP Includes, you can go one step further and start nesting includes for maximum usability. Let me give you an example of where nesting includes can be of benefit.
Let's say you have a medium to large size site and your navigation menus change based on the section that they are in. This type of scenario usually means that you have multiple includes, each one specific to its section within your web.
You may have a group of links in that navigation that are static, i.e.
Home ¦ About ¦ Locations ¦ Site Map ¦ Contact ¦ Legal
Instead of repeating those in each of your primary includes, you can make one include and then nest it into your primaries. Remember, FP Includes are built just like any other page. With nested includes, there are a few things you leave out. For instance, if you have a primary left hand menu that has a containing wrapper, you would not include the containing wrapper code in your nested include page. You would only place the content that is to be nested. The code in your nested include should be a continuation of the primary include.
There is one drawback to using nested includes. Since you are not including the containing wrapper information (i.e. <div>, <table>) in the nested include, when you preview that page (the nested include) in WYSIWYG mode, you will not see any styling that is applied to that wrapper. Once nested and previewed in the primary include, all is fine. Its not a big deal, but I wanted to list the one con of using nested includes which is the only one I can think of.
If you are as strict as I am when it comes to coding, you'll want to make sure that you bring your first opening tag up next to the <body> tag and then bring the </body> tag up to the last closing tag. This will ensure a seamless transition in your included code.
If you are building pages with .asp extensions, FP will not show any <webbot> tags at the browser level when viewing source. This is really cool as it prevents source viewers from determining whether or not it is an FP web.
If you are building pages with .htm extensions, FP will show the <webbot> tags (startspan and endspan) in the source at the browser level.
<!--webbot bot="include" u-include="/nav/x/include-head.asp" tag="head" -->
This FrontPage Tip can be viewed and discussed at these popular fora...