View Full Version : menus and includes
KevinG
10-30-2002, 11:47 PM
as some of you may know i am working on this site at the moment - http://www.designermortgages.com - i have all the live data inserted but i have problem. i'm not happy with my sub navigation. it looks too plain and in 800x600 resolution users can't see all the sub menu in the products section. i want the site to be search engine friendly so i need to stick with text links. i was hoping to come up with something cool using css. but i'm struggling :( any ideas anyone ? i kinda like the cnn.com sub nav but thats a tad above my abilities.
also in the products section the live data is being loaded in using frames, i was wondering if i could instead use either an include to pull the data into predefined area on the page or use a header and footer structure?
personally i would rather use the include as it would be easier for me to chop and change the pages. i figured all i would need to do is make one static page for each sub menu category and maybe use an asp command to pull the data in? does any one know the string command for this, i may be able to use .php if that makes any difference?
help much appreciated. i'm having one of those weeks. boss 'assumed' as a web builder i am also a profesional photographer and graphic design artist! if i could do all that i'd be flying solo.
webmarkart
10-31-2002, 03:37 AM
First of all I like the general site. There is enough content without it looking cluttered. As far as your sub nav menu, you can definitely use an include file:
Using ASP:
MAIN LINKS
<a href="default.asp?action=aboutus">About Us</a>
SUB NAV AREA
<% IF ACTION = "aboutus" Then %>
<!--#include file="aboutus_subnav.inc"-->
<% ElseIf action = "products" Then %>
<!--#include file="products_subnav.inc"-->
<%End If %>
Anyway, I would reduce the space above and below each item in the sub nav area, but I think the simplicity of the sub nav is nice!
ronaldb66
10-31-2002, 08:25 AM
CNN uses javascript rollovers for those sub-nav buttons (for which several excellent scripts can be found), but i recently saw an article on ALA about using HTML lists as structure for a piece of navigation code, and they managed to achieve a similar effect with just CSS. Very impressive!
Check out A List Apart: Taming lists (http://www.alistapart.com/stories/taminglists/). The bit i referred to is almost at the bottom, but it's also worth while to read the entire article to see how they got there.
KevinG
10-31-2002, 10:53 AM
ronald that article is superb. its just what i am looking for. thank you very much.
with regards to using includes instead of frames.
say i build a todaystopmortgages.asp page is it possible to insert the url string (url to call up the live data from another server) in a table so that instead of the "Todays Top Mortgages" data loading as a framed page it loads and displays instead inside a table in my todaystopmortgages.asp page?
You could manage that with an <ilayer> / <iframe> quite easily.
A brief extra note on navigation: From the start page, the red links on the right are immediately obvious and will draw virtually any visitors first click -
The top navigation on the other hand is psychologically near invisible. This is due to 'banner blindness', whereby surfers have gotten so used to banners positioned high on a page that they simply ignore anything above that.
If you brought those links down into the thin grey strip they would be much more apparent to surfers.
An article on building effective navigation in 10 steps (http://www.webmasterbase.com/article/904) for you to peruse.
Nice site btw - very professional.
KevinG
10-31-2002, 02:31 PM
yes the navigation will evolve as the site nears completion. i will probably do something with grey bar. we'll see.
i have no knowledge of iframes what so ever. i'm still hoping someone is going to show me how to use an asp include (or php) to solve ma problem.
redhead
10-31-2002, 02:58 PM
i'm still hoping someone is going to show me how to use an asp include (or php) to solve ma problem
PHP: <?php include('file.html'); ?>
ASP: <!--#include file="file.html" -->
:thumbsup:
KevinG
10-31-2002, 03:29 PM
:eek:
i'm multi tasking today, but surely it can't be that simple? i'll have to wait till tonight before i can fire up DW.
Roy Sinclair
10-31-2002, 03:33 PM
Nope it's not quite that simple. In ASP if the file to be included isn't in the current directory or a directory downstream then you have to use <!--#include virtual="pathtofile/file.htm"-->.
KevinG
10-31-2002, 04:12 PM
roy i don't quite understand that string, could you give me a dummies version of that. i need pull a page in from another site.
Roy Sinclair
10-31-2002, 05:19 PM
Kevin,
If it's on another site then a server-side include isn't going to work at all. Server Side Includes (SSIs) are for including the contents of files local (or file-server type networked) to the web server. If the content you require is located on another server, the use of FRAMES or the IFRAME tag is required. It looks like we've led you down the wrong path with SSIs.
KevinG
10-31-2002, 09:32 PM
this has got me thinking, isn't ssi used to display banners from sites like tradedoubler.co.uk and aren't these banners data held on other servers???
Roy Sinclair
10-31-2002, 09:40 PM
If you look at most banner ad code it's a combination of IFRAME, OBJECT, SCRIPT and IMG tags. While that code may be included using a SSI, it's included from a local source and not via the internet. It's the other tags which bring in the actual content depending on what the user's browser allows.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.