- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Custom Web Templates With SSI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-06-2011 09:13 AM
I've designed a custom layout for the online store and am wondering if anyone knows of a way to use SSI (Server Side Includes) or something equivalent to "include" additional files. I don't mind copying and pasting a change to all the various template files MAS uses, but it would be much more efficient to do it only once and have them all pickup the change(s).
Thanks in advance,
James
MAS 200 [4.40.0.5]
Solved! Go to Solution.
Re: Custom Web Templates With SSI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-26-2011 12:46 PM
I am not sure about your SSI, but all of the templates are rendered as standard HTML. So whatever you would normally do to apply it across several pages still applies. For example with our JavaScripts we use the scriptFile.JS and then reference them in the header of all the templates.
You can do something similar. I assume your SSI scripts are really on your IIS server and not the web engine. So whatever you would normally do to a page, you can do to the templates.
Re: Custom Web Templates With SSI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-27-2011 07:29 AM
GatorGal,
I'm wanting to use SSI in the template files of the online store. I can get SSI to work outside of the store by using a .shtml extension. This in turn tells IIS Application Mappings to process to code using the ssinc.dll. All the online store files have a .pvx extension and are mapped to use the masisapi.dll. I've tried everything I can think of, but unless you can tell it (whatever "it" maybe) to parse the code twice, I don't think there is a way to do SSI.
I thought about using your JavaScript method (document.write) to display the header/footer that way, but I don't like the idea of relying on the user's browser/computer to properly/timely display the site.
Thanks for all your suggestions thus far.
MAS 200 [4.40.0.5]
Re: Custom Web Templates With SSI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-27-2011 11:09 AM
I have not tried this but I know of no limitation on the template extension. The .pvx? included in the Get / Post URL is what triggers the ISAPI plugin to redirect the request to the web engine. The web engine then reads through the template one row resolving the PVX tokens. The result is stored in a memory file. Once the template has been completely resolved it is then sent back to the IIS server in chunks. Sorry, I don't remember the block size.
I guess the question would be if both the ISAPI plug in and the SSI can be executed or if one over rules the other. If both will execute, hopefully the SSI will be executed after the web engine returns the resolved template.
I assume you've tried appending the .shtml to the actual template file stored in the IW directory on the web engine and then modifying your installation to use it in Web Template Maintenance in your MAS 90 installation. (I don't know what you've tried so forgive me if this is too simplistic or something you've already tried.) When I've prototyped "new" templates and functions in the past I've found it easiest to break down the task as follows:
1. From your browser save off a current eBM template that is closest to what your desired results is. This will give you a static page to work with to "design" your end product. By comparing the end product to the template you can see where the tokens are that the web engine is using to add the page content. In your case, I would think you would start with this page and have your SSI invoke to modify it as you desire.
-- I assume this is where you are ? --
2. The next step would be to have the page served up from the web engine. I would think you can use the same static page from #1 as your template on any eBM menu item to test with. All you need to do is copy it to the IW directory and modify the template name in Web Template Maintenance to point to it. Can you put in an on load alert in your SSI so you can tell if it is being hit at all. You can add one to the <body> tag so you can tell when your browser is getting it from the web engine.
I don't understand how the SSI could intercept the get / post before the web engine since it is more like a CGI script and not directly to your .shtml page. Maybe the problem is it doesn't recognize this as a .shtml page since it is being served up by the web engine and not from a static page. Is there anyway to trigger your include from within the .shtml page? Similar to embedding an activeX control.
I don't know if this will help but there are 2 debugging tools we have that may help you with this. But I think the real question is going to be when IIS invokes the SSI. The first is the ISAPI plugin debug. To invoke it add .debug after the .pvx in your main link to assess your eBM pages. Once started it will persist. This will provide technical information at the bottom of the resolved page. I had corruption problem last year. Apparently my notes on the debug techniques were not stored in my directory so forgive me but I am working from memory. The second is a debugging option on the web engine. This will write page requests received / then returned to a text file. Sorry, but I can't remember the particulars on how to set this one up. I doubt this one will be helpful. It will show you the head information received and sent. If you think that be helpful let me know and I will try and dig this up for you.
Re: Custom Web Templates With SSI?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-03-2011 10:33 AM
GatorGal,
I tried everything you mentioned already. I'm a very thorough before asking for assistance. ![]()
I ended up using a JavaScript include statement on the template page to "write" the header and footer for the page. I had to go through and modify each template file to include the .js files, but never-the-less, it works. I chose being JavaScript dependent rather than browser dependent.
Hope this helps somebody. Thanks for all your help.
MAS 200 [4.40.0.5]


