Help - Search - Members - Calendar
Full Version: Nested if/else in skin templates
Invision Power Services > Invision Power Services, Inc. > IPS Company Feedback > IP.Board
ellawella
Correct me if I'm wrong, but I do believe the skin templates do not yet support nested if/else statements.

Eg:

CODE
<if=something>
<div class="something">Show something</div>
<if=something else>
<div class="somethingelse">Show something else</div>
</if>
</if>


It would be nice to see this in IPB 2.2 or 3.0
ryder
It'll be in 3.0 according to: http://blog.mattmecham.com/archives/2005/1...ved_html_l.html
ellawella
Oh, then I guess this topic can be closed original.gif
Luke
You know, honestly, if/else nesting is not a hard thing to do at all. I've done it in my template system easily. I personally dont see why it's not added, and how they prevent nesting... A simple preg_replace does wonders....

If im not mistaken the only reason why it isnt supported is because you get an error when you try to nest so it doesnt actually do it.... And I think it's because when there's a space behind EOF it causes a php error... But with a little determination, it's not hard to make work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.