Webmastersite.net
Register Log In

Description problems

Comments on Description problems

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 13, 2007 - 4:26 AM:

I have two identical sites that I am trying out and perfecting the latest 4.1 version.

http://www.thefishingscene.co.uk and http://www.thebirdscene.co.uk

When adding a link of the type article with just, say, 1 or 2 lines in the description everything is fine and looks great. However, add, say, a reasonable paragraph in the description and it goes bonkers <G> debug is attached. Delete the description and errors disappear but the added field for catphotoattach then shows an empty image.

This only appears to happen when the type is article, so I guess I have done something wrong but blowed if I can see what!

I also attach my linkbits for article type and displaylinks.tpl

This problem is seen on thefishingscene.co.uk/index...ion=displaycat&catid=2


Attached Files:
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 13, 2007 - 4:49 AM:

You need to use the BOOL} template variables appendage for conditionals if you want to test whether something has a value or not. When you use the regular variable, conditionals will die on complex multi-line values.

BOOL} was added sometime around 4.0.30 and has a brief description here: "Sometimes (when you're writing a template conditional) instead of wanting the value of a field you just want to determine whether the field has anything in it or not. To do this you add BOOL to the end of your regular template variable. If you want to check the link field fieldname, for example, use {LINKFIELDNAMEBOOL}."

I'm editing another mention into the conditionals article.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 13, 2007 - 6:55 AM:

Thanks Paul.

I originally had bool for the description field and took it off thinking that it might be wrong to have it there! I have put it back and (touch wood <G>) so far it looks ok.

You state in the manual bool is needed "sometimes". How do we know just when to use it and when not to?

I see that you have also added a "currency" which is great!


Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 13, 2007 - 11:26 PM:

Anytime you're doing a conditional testing for a true/false.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 14, 2007 - 12:09 AM:

Paul wrote:
Anytime you're doing a conditional testing for a true/false.



so, basically, every IF statement?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 14, 2007 - 2:20 AM:

Well, if you want to do an <IF {LINKDESCRIPTION} contains special trigger phrase>show something</IF> then you have to use {LINKDESCRIPTION}, {LINKDESCRIPTIONBOOL} won't help you.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.