Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Template SSI Includes and placeholders

 

 


floodrod
User

Nov 8, 2006, 10:06 AM

Post #1 of 3 (983 views)
Shortcut
Template SSI Includes and placeholders Can't Post

Hi,

I am trying to set up an option where readers can submit rss feeds which will be displayed in the article content.

I went to Admin > Database Editor > Table Editor

I added a field called RSS_URL and gave it a textfield

Now I add code on my template

<!--#include virtual="/rss/rss2html.php?XMLFILE=$RSS_URL$&TEMPLATE=http://www.mysite.com/rss/sample-template.html&MAXITEMS=20" -->

When I add an article with the RSS_URL field filled out, an error message appears saying:

Configuration setting prohibit using the specified feed file, exiting

~~~~~~

Alternately, If I put this into my article page template within the

<!-- templateIf : $RSS_URL$ ne "" <!--#include virtual="/rss/rss2html.php?XMLFILE=$RSS_URL$&TEMPLATE=http://www.mysite.com/rss/sample-template.html&MAXITEMS=20" --> <!-- /templateIf -->

I get [TemplateIf Error: Expression '[unknown placeholder $RSS_URL$] ne "" Configuration setting prohibit using the specified feed file, exiting

Can anyone shed some light as to where im going wrong?

Thanks



ross
Staff / Moderator


Nov 8, 2006, 11:28 AM

Post #2 of 3 (977 views)
Shortcut
Re: [floodrod] Template SSI Includes and placeholders [In reply to] Can't Post

Hi there.

Thanks for posting!

The first thing I noticed there is that the templateIf isn’t quite right. The opening templateIf tag appears to be missing a --> right before you start the SSI.

The second thing here is that you’ll also want to adjust the placeholder you are using. Instead of just $RSS_URL$ you’ll want to try $article.RSS_URL$.

Does that make sense? Here’s an example of what I think the whole thing should look like:



Code
<!-- templateIf : $article.RSS_URL$ ne "" --> 
<!--#include virtual="/rss/rss2html.php?XMLFILE=$article.RSS_URL$&TEMPLATE=http://www.mysite.com/rss/sample-template.html&MAXITEMS=20" -->
<!-- /templateIf -->


I spaced it out a little more just to make it easier to read. Give this a shot and let me know how you make out Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/



(This post was edited by ross on Nov 8, 2006, 11:40 AM)


floodrod
User

Nov 8, 2006, 3:48 PM

Post #3 of 3 (966 views)
Shortcut
Re: [ross] Template SSI Includes and placeholders [In reply to] Can't Post

Of-course it makes senseWink

It totally worked! Changing the placeholder to article.--- and fixing the templateif closing tag did the trick. I also put a templateIF which blocks the article date to appear if the RSS_URL textfield is filled in.

Thanks ross

This makes a totally automated way to open a category where users can submit RSS feeds which are automatically encoded and displayed on article pages in a search engine friendly manner. Nice


(This post was edited by floodrod on Nov 8, 2006, 3:49 PM)