I am currently trying to load different include files based on some simple logic using InSection() but it's not working at ALL. In my main Layout/Page.ss template, I am including a file called SideBarChooser, which then has this logic inside it:
<% if InSection(solutions) %> <% include SideBarSolutions %> <% else_if InSection(clients) %> <% include SideBarClients %> <% else_if InSection(industries) %> <% include SideBarIndustries %> <% else_if InSection(newsroom) %> <% include SideBarNewsroom %> <% else %> <% include SideBar %> <% end_if %>
In some cases ALL the SideBars are being painted to the screen; in others, it just plain doesn't work. Anyone have any idea what's wrong with this?