kirsty
Member
In the
with a different form action.
I thought this could be done using a template modification that finds the above text and replaces it, something like this
But though the Test looks ok the modification won't save and the
I've tried it with regex and get the same result. I guess I could make the
Am I missing something?
Thanks.
forum_post_thread
template I want to conditionally replace the line
Code:
<xf:form action="{{ link('forums/post-thread', $forum) }}" ajax="true" class="block" data-xf-init="attachment-manager"
draft="{{ link('forums/draft', $forum) }}">
with a different form action.
I thought this could be done using a template modification that finds the above text and replaces it, something like this
Code:
<xf:if is="{$forum.my_condition}">
<xf:form action="{{ link('forums/check-thread', $forum) }}" ajax="true" class="block" data-xf-init="attachment-manager"
draft="{{ link('forums/draft', $forum) }}">
<xf:else />
<xf:form action="{{ link('forums/post-thread', $forum) }}" ajax="true" class="block" data-xf-init="attachment-manager"
draft="{{ link('forums/draft', $forum) }}">
</xf:if>
But though the Test looks ok the modification won't save and the
xf:if>
is displayed in bright red.So I think it's saying 'hey, you put in aLine 13: Template tags are not well formed. Tag if was found when expecting form. - Template modifications: public:forum_post_thread
form
tag with no ending tag? Which I have indeed done because I only want to modify this bit of this template at this time.I've tried it with regex and get the same result. I guess I could make the
<xf:form
bit part of a regex grouping so the replace part of the template would just see a $1
or whatever but that seems needlessly complicating. Am I missing something?
Thanks.