Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic includes / asp

Status
Not open for further replies.

alexa

MIS
Apr 17, 2002
2
0
0
GB
I'm working on the setting up of a site quite big, which have several topics. Every topic means a subsite.

As I'm beginner in ASP, I need your advices and help, you'll be welcome with your ideas.

For all pages I have to put a top and a bottom banners, common for all.

From the homepage (menu=left part and contents=middle part, both under the top banner), you have to be able to acced to a topic.

How have I do to get dynamically all pages (with includes) in order to insert the top and banner, then the menu and then, the contents of the file requested.

I mean, wherever you click on the a link, the link should be

myserver/default.asp?folder=x&subfolder=y&filename=z.htm

Once you clicked you get the contents of z.htm, but with the top, the menu and the bottom automacally included.

How we can do this ???

Thank you very much !!
Alexa
 
alexa - there's several ways to do what i think you are describing. the way i would do it is to build a separate file for each page. each file would have its own content in the "middle" section, and would use includes to fill the top banner. bottom banner, and the left border. it would use table cells to generate the different areas.

for instance, the basic code for a page would look something like:

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>
<html>
<head>
... whatever
</head>
<body>
<table width=100%>
<tr>
<td rowspan=3 width=120 bgcolor=gray>
<!-- #include file=&quot;borders/left_border.inc&quot; -->
</td>
<td>
<!-- #include file=&quot;borders/top_banner.inc&quot; -->
</td>
</tr>

<tr>
<td>
... main part of this page goes here
</td>
</tr>

<tr>
<td>
<!-- #include file=&quot;borders/bottom_banner.inc&quot; -->
</td>
</tr>
</table>
</body>
</html>

you could of course just have a SINGLE page and dynamically create a filename for an include file to hold whatever content each button wants, then include the build-up filename in that central cell. That would work, but would limit your flexibility a little bit.
If you use separate pages for each &quot;concept&quot; (or &quot;subsite&quot;) your users can bookmark the pages they want -- if you have only the single page with everything included, they'd only be able to bookmark that, then they'd have to navigate to their desired info using your buttons.

good luck...

dnk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top