optional news icon (edit: If variables)

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

optional news icon (edit: If variables)

Postby BJv » Fri Aug 03, 2007 3:35 pm

*edit* I've actually figured out the code now for anyone who finds this in a search later:

Code: Select all
<If: Field: CustomField_Newsicon>
<img src="<Field: CustomField_Newsicon>" width=150 height=150 id="newsicon">
</If>


I do have another question, I'm trying to add a header to news tables what the actual article is, regular news and interview etc.

When I enter this code:

Code: Select all
<If: Field: Category eq "(default)">News Article</If><If: Field: Category eq "Interviews">Interview</If><If: Field: Category eq "Reviews">Review</If><If: Field: Category eq "Editorials">Editorial</If>


I get this error:
Code: Select all
Error: That style is invalid and has a syntax error. Check, in particular, that all ifs are properly matched and ended. Perl reported the following error, which may or may not be helpful: Unmatched right curly bracket at (eval 14) line 5, at end of line syntax error at (eval 14) line 5, near "; }"


I don't really understand the error what am I doing wrong exactly?
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby BJv » Fri Aug 03, 2007 6:44 pm

This week I seem to have this thing where I answer my own questions 4 hours lately. I remember I was working on another site back in March and there was a bug with the if's and else's. I thought that was fixed a long time ago but apparantly it wasn't.

SRnupsen released a fix for this in this topic: http://www.gocoranto.com/forum/viewtopic.php?t=210 and it solved my problem (again :wink:).
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby Jackanape » Fri Aug 03, 2007 8:02 pm

Thanks for the info, B!

Stay frosty!
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby SrNupsen » Fri Aug 03, 2007 8:55 pm

There was indeed a bug with if / else tags a while ago, and that one was fixed. However, another one was introduced due to some inappropriate spaces in cradmin.pl - which is the fix you mention. Glad you solved your problem!
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway


Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests

cron