Here goes. In order to set up the virtual include, I need to reference the information I'm calling in from another file. In the HTML file for the Dream Jobs front door (we'll call it index.html), I put a call for the teaser fragment file where the text information resides. Such calls for fragments go inside comment tags (<!-- -->), and the fragment files end in .htmlf.
It's important to note that a fragment file is just an HTML file without <html> or <body> tags. In order to call the teasers.htmlf information into index.html, I needed to put this code at the top of the page:
<!--#include virtual="teasers.htmlf" -->
Since I have many different pieces of information in the teasers.htmlf file, not merely one long story, I needed to give each piece of information a unique identification variable. The teasers.htmlf fragment ends up with different variables whose values look like this: <!--#set var="job1top" value='Reaching out to the easy chair' -->
<!--#set var="job1link" value='Marketing Manager' -->
<!--#set var="job1at" value='at NetChannel' -->
Then I wanted a variable from the teasers.htmlf file to be echoed, or repeated, in the index.html file. To do this, I used this code: <!--#echo var="job1link" -->. The echo command "prints" the included variable onto your Web page; if the variable is without a value, it shows up as (none). When viewed over the Web, you can't tell that I didn't just put the text "Reaching out to the easy chair" in the index.html file. Tricky, eh?
The only problem with this system is that I had arrows that needed to be links also. Each of the six color schemes had differently colored design elements (in this case arrows). I didn't just want the anchors from the teasers.htmlf file to ride into the index.html and close after the arrow, because I wanted to keep all my core information in my teasers.htmlf file. What did I do? I used variables to change the colors of the arrows at will. This is where the real cool XSSI stuff comes in. You ready?
next page»