Nesting FrontPage Includes (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


pageoneresults -> Nesting FrontPage Includes (12/14/2004 12:40:00)

This topic assumes that you are familiar with the development of FrontPage Includes, how they function and how to manage them.

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 (i.e. <div>, <table>), 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.

FP Includes Quick Tip 1

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.

FP Includes Quick Tip 2

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.

FP Includes Quick Tip 3

FP includes also work in the <head></head> of your pages. Great for including static content such as external stylesheets, javascript, etc. Be sure to change the tag attribute when using included content in the <head></head>.

<!--webbot bot="include" u-include="include-head.asp" tag="head" -->

Examples of FrontPage Nested Includes




skrile -> RE: Nesting FrontPage Includes (12/15/2004 9:15:15)

Another couple handy tips with includes:

Make your <meta> tags an include. Then when you want to change meta tags, you can do it once in the include and it will propagate throughout your site.

Headers and Footers make great includes.

I often wrap little javascript elements into an include. That way, I can use them on one page, and they never show up unless I need them. Plus, it keeps the development of pages really clean. Instead of 40 lines of javascript, there's one <!--#--> include line.





tinaalice -> RE: Nesting FrontPage Includes (12/15/2004 19:37:28)

"Make your <meta> tags an include. Then when you want to change meta tags, you can do it once in the include and it will propagate throughout your site. "

I was going to say.....However they would be useless from a seo stand point because you would be spamming the engines with the same keywords for every page.... perhaps though you mean something else?

There is a FrontPage addon that will add your meta's and put your title into first postion if you forgot throughout your site however.

mmm i'd not heard of using it in the head tags before. Great tip Pageoneresults - Scott?

Tina




skrile -> RE: Nesting FrontPage Includes (12/16/2004 6:29:11)

Yeah...I work almost exlusively on intranets where stuff in the meta (like foreign character stuff) is for page function! But good point tinaalice.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.2167969