Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
Monkeybrain
Nucleus PhD


Joined: 15 Dec 2005
Posts: 525
Location: Kristiansand, Norway

Post Posted: Sun Jan 24, 2010 10:18 am   Post subject: If,endif in templates
Reply with quote

I'm sure this has been discussed before, but I can't find the thread.

Could someone please explain why we can't use If statements in templates?

_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Back to top

View user's profile Send private message Visit poster's website
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Sun Jan 24, 2010 1:49 pm   Post subject:
Reply with quote

Looking at the code, it appears that someone has tried it before (the if variables are in the list of valid actions in item template fields but are commented). At quick glance, I think I can make it work, but I'm not sure and won't have time to give it a good look until February. Might also be able to get it working in the comments fields of the template, but I doubt I'll try in the other template fields.

I'll put it on my todo list.

_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
WillyP
Nucleus Guru
Nucleus Guru


Joined: 30 Aug 2009
Posts: 770
Location: Pembroke, NH

Post Posted: Sun Jan 24, 2010 4:05 pm   Post subject:
Reply with quote

http://forum.nucleuscms.org/viewtopic.php?t=19497

I've tried to do this myself. I tried various plugins from the Japanese side and none worked, although perhaps I misread the translations of the instructions.

There is also a link to Lord Matt's site where he explains that to do this all you need to do is un-comment the if's in whatever file it was in... that did not work either. Perhaps in an older version it did?

Back to top

View user's profile Send private message Visit poster's website
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 7449
Location: Massachusetts

Post Posted: Sun Jan 24, 2010 11:45 pm   Post subject:
Reply with quote

It's a bit more than uncommenting those lines in ITEMACTIONS.php. There also needs to be a checkCondition() method in ITEMACTIONS.php and maybe some other methods. There's also likely to be some conditions that cannot be checked in a template.
_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
Post new topic Reply to topic
Display posts from previous:   

Page 1 of 1

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group