Results 1 to 5 of 5

Thread: SSI Variables

  1. #1
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SSI Variables

    <P ID="edit" class=small>(Edited by Waggers on 04-May-06 13:03. Edited to show post without confusing lounge software! )</P><div style="width: 100%; background-color: #FFFFFF;">Note: I'm using {{ }} in this post to replace < > to prevent confusing the lounge software!</div hiblock>

    I don't know if this is possible (I've had a really good look around and can't find much of use), but here goes. What I want to do is dynamically set the virtual argument of an #include command. I have an SSI variable, called lead1head, and I've made sure it contains the correct path by using {{!--#echo var="lead1head" --}}

    {{a href="{{!--#echo var="lead1head" --}}"}}test{{/a}}{{p}}
    will produce a link to the file I want to include but {{!--#include virtual="${lead1head}" --}} won't include it. (It includes an error page instead).

    Can the Virtual argument take a variable, and if so, how?
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SSI Variables

    Waggers....Not my area of expertise at all but I have done my best to look around...does this help Apache Tutorial
    Jerry

  3. #3
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SSI Variables

    That's one of the (many) sites I've looked at - unfortunately it doesn't really do the job. I've had a jolly good look round and concluded that it just can't be done.

    Thanks anyway
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: SSI Variables

    Well that is jolly annoying. <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17>That sounds sssoooo British <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    What I need from you then is to describe exactly what you are trying to do? as I was getting a tad confused with all the curly brackety things. Are you looking at link/image changes?
    Jerry

  5. #5
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SSI Variables

    What I've done is set up a kind of blog. Each entry to the blog sits in a folder of its own, (named after the date of the entry, so today's would be 20060508) with several files, containing things like a title, the first line, first paragraph, and complete text. The idea is that all the blog entries will follow this pattern.

    What I then want to do is set up a front page that will show selected titles (ie headlines). My plan was to have a set of files containing the required dates. So if I wanted 5 headlines, I'd have five files, containing (say):
    File 1: 20060508
    File 2: 20060429
    etc.

    The index page would then pick each of those up as a variable (I can do that) and use that variable to include the relevant entry title (and maybe first line or paragraph, similar to the BBC News format). The theory being I'd never need to edit the index page itself, just the files containing the dates. (So to change the lead headline, I'd change "20060508" in File 1 to my desired entry, and the index page would change accordingly).

    I'm sure there's an easier way of explaining it than that, but hopefully you get the idea.
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •