By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,213 Members | 1,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,213 IT Pros & Developers. It's quick & easy.

Dynamic SSI

P: n/a
Hello!
I'm trying to set up a page system using "dynamic" SSI. That means that I
normally use the following on my website:

<!--#include virtual="file.inc" -->

Now I want to make this "dynamic" and I don't have a clue how to do so.
I want to link to a file using something like this:

<a href="file.shtml?dynamic">Link</a>
In "file.shtml" I want to use the "dynamic"-thing that I sent with the
link:

<!--#include virtual=" ??? dynamic ??? " -->

Can somebody help me please? Thank you very much in advance!

-Daniel
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Daniel Keller wrote:
Hello!
I'm trying to set up a page system using "dynamic" SSI. That means that I
normally use the following on my website:

<!--#include virtual="file.inc" -->

Now I want to make this "dynamic" and I don't have a clue how to do so.
I want to link to a file using something like this:

<a href="file.shtml?dynamic">Link</a>
In "file.shtml" I want to use the "dynamic"-thing that I sent with the
link:

<!--#include virtual=" ??? dynamic ??? " -->

Can somebody help me please? Thank you very much in advance!

-Daniel


Use a server-side scripting language.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

P: n/a
Daniel Keller <de**************@gmx.net> wrote:
I'm trying to set up a page system using "dynamic" SSI. That means that I
normally use the following on my website:

<!--#include virtual="file.inc" -->

Now I want to make this "dynamic" and I don't have a clue how to do so.
I want to link to a file using something like this:

<a href="file.shtml?dynamic">Link</a>

In "file.shtml" I want to use the "dynamic"-thing that I sent with the
link:

<!--#include virtual=" ??? dynamic ??? " -->

Can somebody help me please? Thank you very much in advance!


Depends on your server. It may support XSSI which would permit the
following syntax:

<!--#include virtual="$QUERY_STRING" -->

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

P: n/a
"Daniel Keller" <de**************@gmx.net> wrote in message
news:5f****************************@40tude.net...
: Hello!
: I'm trying to set up a page system using "dynamic" SSI. That means that I
: normally use the following on my website:
:
: <!--#include virtual="file.inc" -->
:
: Now I want to make this "dynamic" and I don't have a clue how to do so.
: I want to link to a file using something like this:
:
: <a href="file.shtml?dynamic">Link</a>
:
:
: In "file.shtml" I want to use the "dynamic"-thing that I sent with the
: link:
:
: <!--#include virtual=" ??? dynamic ??? " -->
:
An alternative to server-side scripting is WebCharm custom tags. For example,

- on line 2 of file.shtml, specify this tag
<!--%pageRequestServlet,1,*,2,300 %-->
your HTML code should start on line 3
- within file.shtml specify this tag at the include content location
<!--@topic lnk2 0 inc_file_list.txt@-->
- the inc_file_list.txt content may look like
home, file1.inc
f1, file1.inc
f2, file2.inc
f3, file3.inc
...
Note: (.inc) files are assumed to be in HTML format
- then specify your link URL like this
<a href="file.shtml?lnk2=f1">Link to file1.inc</a>
<a href="file.shtml?lnk2=f2">Link to file2.inc</a>
...

In order for this to work, the WebCharm engine must be used to process
the page requests (i.e. file.shtml?lnk=f1). If you don't have it already, WebCharm
Free is available for download here:

www.edgesoft.ca/go/wcindex.html?top=wcdl

WebCharm tag documentation is available here:

www.edgesoft.ca/wcindex.html?top=wcug

With Apache 2.0 the output generated by WebCharm can be further processed
using SSI, but this would be somewhat redundant.

Good Luck,

Long

Jul 20 '05 #4

P: n/a
Daniel Keller wrote:

Hello!
I'm trying to set up a page system using "dynamic" SSI. That means that I
normally use the following on my website:

<!--#include virtual="file.inc" -->

Now I want to make this "dynamic" and I don't have a clue how to do so.
I want to link to a file using something like this:

<a href="file.shtml?dynamic">Link</a>

In "file.shtml" I want to use the "dynamic"-thing that I sent with the
link:

<!--#include virtual=" ??? dynamic ??? " -->

Can somebody help me please? Thank you very much in advance!


I use SSI to generate a Web page on the fly. Is this similar to
what you want? If so, read on.

The "Web page on the fly" is an index of all my Web pages. You
can see it by going to my home page (signature line below) and
scrolling to the bottom. The select "Index of Web Pages".

What happens is that this link is to a small page that contains a
SSI request that causes a Korn shell UNIX script to generate a
HTML file named index_list.html in my main Web directory on my
ISP's Web server. The small page also has the following META tag:
<META HTTP-EQUIV="Refresh" CONTENT="5;
URL=http://www.rossde.com/index_list.html">
This META tag causes the newly generated HTML file to load on the
visitor's browser. Note that the 5 second delay is only for
effect, to make the visitor think something real complicated is
happening. I believe the small page would not really load in the
visitor's browser until the SSI is completed. (I'm going to
change the delay to 1 second.)

Counters are done via SSIs in a similar manner, but their results
go into the Web page that contains the SSI request. My counter
does not merely count hits. It first checks to see if the latest
previous hit was from the same IP address within the past 5
minutes; if so, it does not increment the counter. Using
different input parameters, I then use that counter script to
maintain distinct counters for 13 different Web pages on my site.

Note that I made special arrangements with my ISP to make Korn my
default shell rather than the usual C shell. De gustibus non est
disputandum.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone snooping into your E-mail?
Use PGP. See my <http://www.rossde.com/PGP/>
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.