Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
How to refer to category in code with a space in its name

 

 


lamberticus
User

Sep 24, 2009, 10:15 AM

Post #1 of 3 (1641 views)
Shortcut
How to refer to category in code with a space in its name Can't Post

I'm trying to set up a templateif command conditional on if an article is not a member of a certain category.

<!-- templateIf : $category.Alumni Profiles$ != "1" -->

As you see the category name has a space in it. How does one deal with this in the code?

Thanks!

Andy


Donna
Staff / Moderator


Sep 24, 2009, 4:28 PM

Post #2 of 3 (1630 views)
Shortcut
Re: [lamberticus] How to refer to category in code with a space in its name [In reply to] Can't Post

Hi Andy,

That's not quite how a placeholder works -- $category.Alumni Profiles$ wouldn't be a valid placeholder. $category.name$ would be, and the value for that placeholder could be Alumni Profiles.

So, instead, you could do something like this:

<!-- templateIf : $category.name$ ne "Alumni Profiles" -->

Give that a try and let me know how it works. :)

Donna

--
support@interactivetools.com


lamberticus
User

Sep 25, 2009, 6:59 AM

Post #3 of 3 (1595 views)
Shortcut
Re: [Donna] How to refer to category in code with a space in its name [In reply to] Can't Post

Hey that works great! Thanks much.