Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2006, 11:09 PM
Authorized User
 
Join Date: Jan 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Includes

Imar, I am doing a site in CSS so all my menu's are DIV'd. I have a horizontal menu with links. I have a Right side DIV with a layer that was drawn inside it using the layout menu in dreamweaver.I have the horizontal menu in an ASP INCLUDE asp file. on mouseover behavior I was hoping that I could specify the layer within the right side div would show the image I placed within it. The problem is that since my horizontal menu is in an include file it only shows layers for that page so I can't tell it to show the layer in the right div. I can accomplish this by also adding the right side div into the include file that contains my horizontal div. I guess my main concern is that I have a header, horizontal, leftNav, Maincontent, RightNav, and footer divs and the DIVS I have that are not in includes are my maincontent and header sections. Is this ok to have so many includes and also is it ok to have to seperate divs within an include file? The template mechanism to me at least seems buggy at best especially if you edit it after it has been applied to pages. Sometimes I get duplicate pages as in same page on top of one another after a template update.

 
Old March 8th, 2006, 03:50 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am not sure I understand what you're asking here... (the absence of some line breaks here and there didn't really help... ;) )

Anyway, the way includes work is like this: before the code in a file is parsed, all include files referenced in the main page (and any other includes that those include files include in turn) are collected and put into one long file which is then executed. So, it doesn't really mater what you put where in an include.

I am not aware of a limit on include files, or the maximum number of them for reasonable performance. However, you can easily have like 10 includes in your file, although I personally think that's way too much....

However, there are a few rules you should stick to to make your fellow developers and design time tools like Dreamweaver happy:

1. Don't put partial tags in an include.
So, don't have an include that has just a bunch of <tr> tags and that assumes it'll be included in a file that sets up the outer <table> tag. Includes are about reuse, and partial tags make that very difficult. However, inside the include file, you can use whatever HTML or ASP code you like.

2. Don't get carried away with includes. I have seen sites where partial content was moved to an include while it could have been placed directly in the page. If you're not going to reuse it anywhere else, place it in the page directly.

3. Depending on your preferences, you can either put surrounding divs in the main page, or in the include. E.g.:

<div id="Menu">
 ' Include here
</div>

or:

' Include here

where the include file then looks like this:

<div id="Menu">
 Content
</div>

I prefer the first, but that's up to you.

Does this help?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: 5 Years by Björk (Track 6 from the album: Homogenic) What's This?
 
Old March 9th, 2006, 04:11 PM
Authorized User
 
Join Date: Jan 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Absolutely it helps. Thanks. I will make sure to take a breathe or two and put some line breaks in my post next time.

 
Old March 9th, 2006, 05:39 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome...

Breathing is always a good thing to do every now and then; especially when you're programming.... ;)

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic XML file from asp includes jfergy Classic ASP Professional 0 April 7th, 2006 02:20 AM
ASP Includes in .NET sabu21s Classic ASP Databases 0 October 20th, 2005 04:43 PM
ASP Includes in XSL Alexpizzoferro Classic ASP XML 3 June 3rd, 2005 05:22 AM
ASP Includes in XSL Alexpizzoferro XSLT 1 June 2nd, 2005 02:47 PM
ASP SSI Includes from parent directory ALoPresto Classic ASP Basics 1 August 4th, 2003 02:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.