<IF>-statements in templates - possible? how?

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

Moderator: Spunkmeyer

<IF>-statements in templates - possible? how?

Postby webtrends » Wed Nov 02, 2005 11:57 am

Im a total newbie in coranto.

Is it possible to use IF -statements in templates; like
<If: Field: Customfield_xxxx>
<a href="www.<Field: Customfield_xxxx>">go tol</a>
</If>

used in styles; if not is there another possibilty to use if in templates.

Sorry for my bad english.
webtrends
 
Posts: 2
Joined: Wed Nov 02, 2005 11:49 am

Postby SrNupsen » Wed Nov 02, 2005 4:15 pm

If statements can't be used in templates.

However, if you only have 1 news item per HTML page then you can put all of your HTML code (and if statements, and any other Coranto pseudocode) into your style, and then set the profile to use a template that contains only:

Code: Select all
<Field: Content>


This way, all of your news will be processed inside your style. If you have several news items per page, this won't work, obviously, since each item would then be wrapped inside your whole HTML cdoe from <html> to </html>. Which would produce very strange HTML.

SrNupsen
-----------------------------------------------------------------------------------------------------
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

Postby webtrends » Fri Nov 04, 2005 3:58 pm

Thanks alot!
webtrends
 
Posts: 2
Joined: Wed Nov 02, 2005 11:49 am

Postby SrNupsen » Sun Nov 06, 2005 1:32 am

We aim to please 8)

SrNupsen
-----------------------------------------------------------------------------------------------------
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 1 guest

cron