Using SSI with topstyle
-
- Rank 0 - Newcomer
- Posts: 7
- Joined: Thu Aug 23, 2012 9:15 am
Using SSI with topstyle
Is there a trick to getting SSI to work with classic ASP and topstyle? Got mappings setup no problem but SSI are completely ignored within topstyle.
-
- Rank VI - Professional
- Posts: 506
- Joined: Sat Jun 13, 2009 12:38 pm
Re: Using SSI with topstyle
Have you tried the "Server-Side Include" snippet? (available on the "Script" tab of the HTML toolbar).
SSI is server-side technology and as such mostly out of TopStyle's control. Assuming you have configured preview mappings, then things should "just work".
SSI is server-side technology and as such mostly out of TopStyle's control. Assuming you have configured preview mappings, then things should "just work".
-
- Rank I - Novice
- Posts: 18
- Joined: Thu Nov 29, 2012 8:37 pm
Re: Using SSI with topstyle
Why is it necessary to set up preview mappings ?
I work on a copy of the site on the local pc.
I've got a (local) page that contains <!--#include file="~~head.html" --> (fails with #include virtual as well)
It should try to include the ~~head.html relative to the current document.
If I set up mapping for my local directory to use the website address, then all of my previews fail.
I realize that SSI is outside of TopStyle's control but it would seem an easy and useful addition
I work on a copy of the site on the local pc.
I've got a (local) page that contains <!--#include file="~~head.html" --> (fails with #include virtual as well)
It should try to include the ~~head.html relative to the current document.
If I set up mapping for my local directory to use the website address, then all of my previews fail.
I realize that SSI is outside of TopStyle's control but it would seem an easy and useful addition
-
- Rank VI - Professional
- Posts: 506
- Joined: Sat Jun 13, 2009 12:38 pm
Re: Using SSI with topstyle
Without preview mappings, TopStyle is previewing a LOCAL copy of the document you're editing (not a REMOTE copy of the document you're editing)SteelToad wrote:Why is it necessary to set up preview mappings ?
Are you getting an error? If yes, what error? Please be more specific.SteelToad wrote:If I set up mapping for my local directory to use the website address, then all of my previews fail.
-
- Rank I - Novice
- Posts: 18
- Joined: Thu Nov 29, 2012 8:37 pm
Re: Using SSI with topstyle
YES, that is exactly the behavior I would like.Without preview mappings, TopStyle is previewing a LOCAL copy of the document you're editing
Editing a live site is not an option for me, so I replicate the entire site locally and work on that. I only refer to pages and files with relative addressing instead of by a full URL. If in my index.html I use <!--#include virtual="~header.html" --> , I want it to include the local ~header.html relative to the file I am editing.
Preview Mappings doesn't work for me because I'm not using a local web server, but a remote one.
If I map my local directory (w:/kscs) to the URL (http://kscs.info/), then I get a 404 even though index.html is present in both locations. I understand that the Mappings feature is meant for local mapping, so this doesn't surprise me.
-
- Rank VI - Professional
- Posts: 506
- Joined: Sat Jun 13, 2009 12:38 pm
Re: Using SSI with topstyle
You don't have to edit a live site. You can install a local web server, and then point preview mappings to http://localhostSteelToad wrote:Editing a live site is not an option for me, so I replicate the entire site locally and work on that.
No problems here. Relative paths are OK with preview mappings.SteelToad wrote:I only refer to pages and files with relative addressing instead of by a full URL. If in my index.html I use <!--#include virtual="~header.html" --> , I want it to include the local ~header.html relative to the file I am editing.
If you're using any server-side technology, then preview mappings are the way to go. Without preview mappings, you basically bypass your server technology (SSI, or ASP, or PHP, or whatever)SteelToad wrote:Preview Mappings doesn't work for me because I'm not using a local web server, but a remote one.
If you're getting a 404 then the URL is incorrect or your web server isn't running (have you tried the same URL in your web browser?)SteelToad wrote:If I map my local directory (w:/kscs) to the URL (http://kscs.info/), then I get a 404 even though index.html is present in both locations.
Server mappings are both for live site editing and local web server editing.SteelToad wrote:I understand that the Mappings feature is meant for local mapping, so this doesn't surprise me.
-
- Rank I - Novice
- Posts: 18
- Joined: Thu Nov 29, 2012 8:37 pm
Re: Using SSI with topstyle
I realize I could install a local web server, but for a couple of reasons, I'd really rather not. Again, I understand that SSI isn't really part of TopStyle editing, but it would be really nice if it could support it by reading in the include file when the tag is detectedTopStyle Support wrote:You don't have to edit a live site. You can install a local web server ...
In my W:/kscs/ I have index.html and ~header.html. My index.html contains "<!--#include virtual="~~header.html" -->"TopStyle Support wrote:If you're getting a 404 then the URL is incorrect or your web server isn't running (have you tried the same URL in your web browser?) ---- Server mappings are both for live site editing and local web server editing.
The website and server are up and running.
Both w:/kscs/ and http://kscs.info/ contain the files index.html and ~~header.html
If I map W:\kscs\ to http://kscs.info/ I get a page not found. If I uncheck 'Use mappings when previewing' and refresh the page it works again.
-
- Rank VI - Professional
- Posts: 506
- Joined: Sat Jun 13, 2009 12:38 pm
Re: Using SSI with topstyle
What happens when you open http://kscs.info/ in your web browser?SteelToad wrote:If I map W:\kscs\ to http://kscs.info/ I get a page not found.
-
- Rank I - Novice
- Posts: 18
- Joined: Thu Nov 29, 2012 8:37 pm
Re: Using SSI with topstyle
I see the web page just like anyone else does.
I made a copy of the index.html and renamed it to index.txt if you want to take a look
http://kscs.info/index.txt
I made a copy of the index.html and renamed it to index.txt if you want to take a look
http://kscs.info/index.txt
-
- Rank VI - Professional
- Posts: 506
- Joined: Sat Jun 13, 2009 12:38 pm
Re: Using SSI with topstyle
I'm getting this: 404 Safari can’t open the page. Safari can’t open the page “http://kscs.info/index.txt” because the server where this page is located isn’t responding.SteelToad wrote:I made a copy of the index.html and renamed it to index.txt if you want to take a look http://kscs.info/index.txt
-
- Rank I - Novice
- Posts: 18
- Joined: Thu Nov 29, 2012 8:37 pm
Re: Using SSI with topstyle
I'm guessing you're coming from outside of the US ? I've got some rather draconian firewall rules set up. If you'd like to email me an IP range, I'd be glad to punch a hole for you, or if you'd like I can email you back the files
-
- Rank VI - Professional
- Posts: 506
- Joined: Sat Jun 13, 2009 12:38 pm
Re: Using SSI with topstyle
I would like to reproduce your problem and investigate why preview mappings don't seem to work for you.