Skip to main content

I have a tabset, and on one of my tabs I want to change the title based on whether there is data in two of the models.

{{#$Model.Model1.data.length}}Name1{{/$Model.Model1.data.length}} {{#$Model.Model2.data.length}}Name2{{/$Model.Model2.data.length}} History

What I’m trying to say here, is "If Model1 has data rows, display the word “Name1.” If Model2 has data rows, display the word “Name2.”

If they both have data, I would see Name1 Name2 History.

It’s not working. Is there a way to accomplish this?

Should work. What do you get now?


Only one of my models has data, but I’m getting both names.


Ah… scratch that. Now it’s working. Looks like I didn’t give my page time to save in the editor before I refreshed the preview.