Help - Search - Members - Calendar
Full Version: about a Girlies trick
Movable Type Community Forum > Additional Resources > Tips and Tricks
dotpitch
Here is a tip by Girlie to include lists of entries from within 1 category inside of an indextemplate (for instance).

I followed the steps on the page but nothing happens so far. I can process SSI on my site, the line within the individual entries is correct:

CODE
<body>
<!--#include virtual="http://www.spoenk.nl/weblog/archives/fotografie.shtml"-->


(Strange place to put the code, but I'm still testing...)

and the file it wants (fotografie.shtml) is in that same location on the server.

Any ideas on why I can't see something happening?
girlie
You may need to use a server path rather than a URL in the include statement. Also, is the extension on the page you're including that file into either .shtml or .shtm?
dotpitch
Well, i tried the full server path (MTBlogSitePath), including the "archives/" so that it would really point to the file where the page is (test page), and the code within the individual archive is:

<!--#include virtual="/home/sites/site142/web/weblog/archives/fotografie.shtml"-->

I checked with my hosting provider to see if I needed to undertake extra steps to use SSI, but that isn't so.

Also, I must admit, I don't understand how this code can see the difference between the two categorietemplates I just created. One for "fotografie" and one for "gedichten". mellow.gif As far as I can see the code:

CODE
<!--#include virtual="<$MTBlogSitePath$>archives/<MTEntryCategory dirify="1">.shtml"-->


could call fotografie.shtml or gedichten.shtml?

Both of the extensions are .shtml
(you can check this above).

Aah, this MT-thing is more complicated than I thought. I haven't seen the light yet, or perhaps I've been staring too long into the light of my computerscreen today sad.gif
girlie
First, I think you need to change the extension on the Individual Archives to .shtml or .shtm - the include is being ignored because the page isn't recognized as SSI.

Second, if every entry doesn't have a category, you'll end up with this:

CODE
<!--#include virtual="/home/sites/site142/web/weblog/archives/.shtml"-->


See there at the end, where there's no file name before .shtml? That's from the source of your page here.

Once you change the extensions, you're going to get an error on that page that says An error occurred while processing this directive because it won't be able to find a file with no name, which is why every entry must have a category assigned to it for this to work out right.
dotpitch
That makes sense!

Well, thanks again for your help! Tomorrow I'm gonna try it again with those changes.

Have a nice day smile.gif


Jack
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.