Can I insert a PHP fragment in the template to do it? _any_ easy hack-ish way would save me a lot of time at this point.
I've tried using $contentTemplate, $controllerName, etc... but they seem to be ignored, despite showing up correctly with <xen:helper dump...
The base problem I'm trying to solve is as follows:
I want visitors to be able to start a conversation with anyone in a thread by simply clicking on their name. I've modified their username links in message_user_info template to form the link:
HTML:
<xen:if is="{$visitor.user_id} AND {$user.user_id} != {$visitor.user_id}">
<a class="username userText" href="{xen:link conversations/add, '', 'to={$user.username}'}">
{$user.username}
</a>
<xen:else/>
<xen:username user="$user" class="userText" itemprop="name" rich="true" />
</xen:if>
I'm calling the conversation_add template via an OverlayTrigger link. It's working great, except that the overlay initialises the richtext editor, which means you end up with doubled-up editors in the quick reply editor (that's already on the bottom of the page).
I only need the textarea editor when I'm calling conversation_add as an overlay. I've tried a whole bunch of conditionals in various places that seem ignored (due to template includes/nesting order? who knows).
In the conversation_add template, my work-around was to make this mod where the editor is called:
HTML:
<xen:if is="{$requestPaths.requestUri} == '/conversations/add'">
{xen:raw $editorTemplate}
<xen:else/>
<xen:hook name="editor" params="{xen:array 'editorId={$editorId}'}">
<div class="editorPadding">
<textarea name="{$formCtrlName}" id="{$editorId}" class="textCtrl MessageEditor" style="{xen:if $height, 'height: {$height};'}">{$message}</textarea>
<input type="hidden" name="_xfRelativeResolver" value="{$requestPaths.fullUri}" />
</div>
</xen:hook>
</xen:if>
Now, this actually solves all of the issues, except when someone adds a conversation via the traditional way:
http://domain.com/conversations/add?to=some-username
This fails the {$requestPaths.requestUri} conditional because of the querystring on the end. If I could have it ignore that string, it would be finished
Hope that makes sense!
Also, please keep in mind I'm not a programmer. I have a designers brain and fail at this sort of stuff. Since it's a personal project, I'm stuck with it
Cheers