S
Sike
Hi everyone,
I've been browsing this and a few other related newsgroups trying to
get my head around this problem, and so far all the trails seem to go
cold, without an acceptable solution being reached. I'm posting here
because there seems to be a few MVP's knocking around, and if they dont
know, then it's a safe bet nobody does.
I'm beginning to think that what I want to do is simply not possible -
but i'll put it out there once more.
Here goes: I'm writing a content managaement system - and i'm making
use of dynamic includes via the "read a text file" technique, and then
substitiuting values into markers in the template.
For example. I have a text "template" file, that contains the html for
the dynamic page. Within the html text file are various markers that
are replaced at run time with statements such as:
myText = replace(myText, "##topnav##", topheader)
which works great. However, this substitution has to be hard coded
somewhere into the application. This is obviously suboptimal - as for
every new template I add, I need to write a specific "build" function
for that page's substitutions.
My planned work around, was to make the "build" function an asp page
that is Server.Executed when required....and making the build function
file editable through the CMS. Thus allowing me to edit the way the
page is built without editing core logic.
The problem is how I pass the variables to be substituted into the
template into the Server.Execute file. Here's the catch: I need to pass
Objects into the build file - specifically a dictionary object that
contains all the substitutions to be made.
i.e. obj.item( topheader ) = "this is the page header"
obj.item( phonenum ) = "017738393" etc.
I simply cant get this to work. I hope i've explained it clearly
enough. Anybody got any ideas?
One final question: Is it possible to specifiy a dynamic filename for
a Server.Execute?
i.e.
Dim fName
fName = "buildSalesPage.asp"
Server.Execute fName
Thanks for reading this ridiculously long post.
Hope somebody out there can offer a solution - or a work around. I'm
sure other CMS systems must have similar problems.
Thanks again.
Tony
I've been browsing this and a few other related newsgroups trying to
get my head around this problem, and so far all the trails seem to go
cold, without an acceptable solution being reached. I'm posting here
because there seems to be a few MVP's knocking around, and if they dont
know, then it's a safe bet nobody does.
I'm beginning to think that what I want to do is simply not possible -
but i'll put it out there once more.
Here goes: I'm writing a content managaement system - and i'm making
use of dynamic includes via the "read a text file" technique, and then
substitiuting values into markers in the template.
For example. I have a text "template" file, that contains the html for
the dynamic page. Within the html text file are various markers that
are replaced at run time with statements such as:
myText = replace(myText, "##topnav##", topheader)
which works great. However, this substitution has to be hard coded
somewhere into the application. This is obviously suboptimal - as for
every new template I add, I need to write a specific "build" function
for that page's substitutions.
My planned work around, was to make the "build" function an asp page
that is Server.Executed when required....and making the build function
file editable through the CMS. Thus allowing me to edit the way the
page is built without editing core logic.
The problem is how I pass the variables to be substituted into the
template into the Server.Execute file. Here's the catch: I need to pass
Objects into the build file - specifically a dictionary object that
contains all the substitutions to be made.
i.e. obj.item( topheader ) = "this is the page header"
obj.item( phonenum ) = "017738393" etc.
I simply cant get this to work. I hope i've explained it clearly
enough. Anybody got any ideas?
One final question: Is it possible to specifiy a dynamic filename for
a Server.Execute?
i.e.
Dim fName
fName = "buildSalesPage.asp"
Server.Execute fName
Thanks for reading this ridiculously long post.
Hope somebody out there can offer a solution - or a work around. I'm
sure other CMS systems must have similar problems.
Thanks again.
Tony