Webmastersite.net
Register Log In

Problem with conditional
Can't figure this out!

Comments on Problem with conditional

fusionx
Experienced

Usergroup: Customer
Joined: Jun 18, 2008

Total Topics: 22
Total Comments: 85
fusionx
Posted Nov 10, 2008 - 7:07 AM:

I'm trying to see if there are any "sponsored" listing in a category. I can't figure out how to get something like this to work:

<h2>Featured Listings</h2>
<!-- BEGIN SPONSORED LINKS -->
<IF {SPONSOREDTOTAL} is greater than 0>
[INSERTFILE=linkbit]
<ELSE>
There are no featured links in this category<br />
</IF>
<!-- END SPONSORED LINKS -->

If there are sponsored links, they show. If there are not any sponsored links, the text does NOT show. I've tried OTHERWISE in place of the ELSE - I really don't understand the difference.. but neither will show the text string.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Nov 10, 2008 - 5:36 PM:

You're putting your conditional within the BEGIN SPONSORED area, which means it can only be displayed if there are sponsored links (and will be shown once for each link) -- so the else can never do anything. If you want to test for both conditions, put it somewhere outside the sponsored area.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.