I run a site in which I use #includes on my asp pages to insert a standard site navigation bar, header and footer on each page. I recently added blogger.com utility to my page for a news and latest features type information. The problem is that the template that I use for blogger is an ASP page with #includes. This works great when you are looking at the blog index. However, the archives get all screwed up because they are archived in year/month directories, and thus the path for the #include gets messed up. Unfortunately I don't believe that you can use full path names for #includes, and you can't make them dynamic. Neither of the following work:
Code:
<%
Dim path
If isArchivePath Then
path = "../../.."
Else
path = ".."
End If
%>
<!-- #include file="<%=path%>/inc/sidebar.asp" -->
' OR
<%
If isArchivePath Then
%>
<!-- #include file="../../../inc/sidebar.asp" -->
<%
Else
%>
<!-- #include file="../inc/sidebar.asp" -->
<%
End If
%>
Anyone have any great ideas? I don't believe that I can use two different templates for blogger index page and archived pages.
Thanks in advance...
Chris
----------------------------------------------------------------
There are 10 types of people in this world:
those who understand binary, and those who don't.
--------------------- www.aardwulf.com ------------------------
----------------------------------------------------------------
There are 10 types of people in this world:
those who understand binary, and those who don't.
--------------------- www.aardwulf.com ------------------------
[Edit: Oops, this was supposed to be a reply to a thread which quoted this thread - sorry..!]
Cool, I wasn't aware of that one
Although a quick test shows that page defined variables are not passed through to the executed page, only Server / Application variables.
For example...
The Execute method works slightly different to SSI. SSI simply grabs the code and pastes it into the parent file whilst Execute will actually execute the desired file seperately.
So both methods are still useful depending on the context of the problem.
Bookmarks