Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Nested Controls

Go to End

2 Posts   1714 Views


Community Member, 6 Posts

17 December 2009 at 8:30am

Edited: 17/12/2009 8:38am

Hey hey,

Is it possible to have nested control?

I have this code here

<% control getSpeciesType %>
        <div class="species">
            <% control ShowSpeciesByType %>
            <% end_control %>
<% end_control %>

Both custom functions returns a DataObjectSet. But i've tried debugging by putting an exit(); in my nested function (ShowSpeciesByType) but the script doesn't even get there

So is it possible to have nested Controls??



Forum Moderator, 5523 Posts

17 December 2009 at 8:57am

Yes you can have nested controls but once your in the getSpeciesType control then the scope of the template changes to the SpeciesType object so whatever control you want in that - eg ShowSpeciesByType needs to be a function in the SpeciesType class.