Forum

Thread tagged as: Problem

Nested perch:content tag does not work.

I tried implementing nested perch:content, but that does not work at all for me.

Find my code below:

PerchSystem::unset_var('default_site');
PerchSystem::set_var('default_site', 'My Site');

Passing the above mentioned variable to perch template, code as below:

<perch:content id="site" type="text" label="Site" default="<perch:content id="default_site" type="hidden" />" />

How can go ahead with this piece of code?

Damian McCracken

Damian McCracken 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

No, that won't work - you can't do that.

:-( that's sad.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you set a var with the same ID it will pre-fill. But you can't just jam tags inside each other and hope for the best.