Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
New category Title or use the old one

 

 


carminejg3
User

Apr 23, 2009, 5:21 PM

Post #1 of 3 (1307 views)
Shortcut
New category Title or use the old one Can't Post

Ok im excited about the ability to pull off this question. I'm just not sure how to finish it.
I created a field in the category database called Category SEO Title with the placeholder name of CategorySEOTitle.

What i want to do is an if test on this field. by defualt I'm using the category name which also drives the nav menu and i would like to add this catseofield to rename the page, but NOT the category menu name.

So I think an if test like this might do it.


Category SEO Title is empty print defualt category name
<!-- templateIf : $CategorySEOTitle$ eq "" -->
$my.homepageName$
<!-- /templateIf -->

Category SEO Title has new title print that instead.
<!-- templateIf : $CategorySEOTitle$ ne "" -->
$CategorySEOTitle$
<!-- /templateIf -->

is this the right way?

I also played with this version

<!-- templateIf : $CategoryTitle$ eq "" -->
$category.name$
<!-- /templateIf -->
<!-- templateIf : $CategoryTitle$ ne "" -->
$category.categorytitle$
<!-- /templateIf -->


Webmaster [wink]
http://news.carjunky.com

(This post was edited by carminejg3 on Apr 23, 2009, 11:43 PM)


ross
Staff / Moderator


Apr 27, 2009, 9:52 AM

Post #2 of 3 (1223 views)
Shortcut
Re: [carminejg3] New category Title or use the old one [In reply to] Can't Post

Hi Carmine

Thanks for posting!

I actually think either of those two options should work. Had you tried either of them?

If the field is empty, use the category name. If the field has something in it, use that.

It's an if statement that has many uses (you can do the same for displaying a field on you article page).

Let me know how you make out once you've added all that code to your templates.

Thanks!
-----------------------------------------------------------
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/



carminejg3
User

Apr 27, 2009, 10:36 AM

Post #3 of 3 (1221 views)
Shortcut
Re: [ross] New category Title or use the old one [In reply to] Can't Post

Hi Ross,

I tried it and the category seo title worked... but for some reason the category name was causing an error...

I will try it again and confirm it. it might be because im not using the right validator or compare method. I just figured to look for an empty category title, then use the category name would be best.


Webmaster [wink]
http://news.carjunky.com