Hi.
I've been trying all afternoon to figure out what I'm doing wrong.
I've got a template page with a couple of possible variables that get set when a visitor arrives.
Depending on which variable gets set, I'm trying to use a different <cms:pages> tag with different parameters set.
However, when I use a series of <cms:if> statements for each pages option, I get an error:
ERROR! Closing tag "if" has no matching opening tag (line: 165 char: 6403)
Here is my code:
The funny thing is that I'm using exactly the same <cms:if> statements to change the page headings, and they work fine. No errors. Function perfectly.
It's only when I'm using <cms:pages> inside the if statements that I get any error at all.
Any ideas?
If nothing obvious, I'll rebuild the page from scratch and see if that irons things out.
EDIT: It's starting to dawn on me that maybe one can't use pages tags inside if statements, but I don't know where to look to confirm that. Or maybe the problem is that one can't open a pages tag unless one also closes it inside the same if statment. Maybe that's the issue?
I've been trying all afternoon to figure out what I'm doing wrong.
I've got a template page with a couple of possible variables that get set when a visitor arrives.
Depending on which variable gets set, I'm trying to use a different <cms:pages> tag with different parameters set.
However, when I use a series of <cms:if> statements for each pages option, I get an error:
ERROR! Closing tag "if" has no matching opening tag (line: 165 char: 6403)
Here is my code:
- Code: Select all
<cms:if my_var_1 > <cms:pages masterpage='blog.php' limit='20' orderby='random' > </cms:if> <cms:if my_var_2 > <cms:pages masterpage='blog.php' limit='20' orderby='publish_date' paginate='1' > </cms:if> <cms:if my_var_1=='' && my_var_2=='' > <cms:pages masterpage='blog.php' limit='20' paginate='1' custom_field="blog_type=<cms:show blogtype />" > </cms:if>
The funny thing is that I'm using exactly the same <cms:if> statements to change the page headings, and they work fine. No errors. Function perfectly.
It's only when I'm using <cms:pages> inside the if statements that I get any error at all.
Any ideas?
If nothing obvious, I'll rebuild the page from scratch and see if that irons things out.
EDIT: It's starting to dawn on me that maybe one can't use pages tags inside if statements, but I don't know where to look to confirm that. Or maybe the problem is that one can't open a pages tag unless one also closes it inside the same if statment. Maybe that's the issue?