Generic Dialogue Box


Active member
Is there a recommended way of using a generic dialogue box for the purposes of informing/warning the user?

To date, I've been using a simple template:
<xen:h1>{$title}: {$subtitle}</xen:h1>

<div class="sectionMain">
    <div class="primaryContent">{$message}</div>
    <div class="sectionFooter overlayOnly">
        <a class="button primary OverlayCloser">{xen:phrase close}</a>
In my controller, depending on what conditions are met I'll either return the intended view or the above "info" view with context specific $title, $subtitle and $message.

Just wondering if there's a facility within XenForo that will achieve the same thing and forgo the need for me to have this template?


XenForo moderator
Staff member
You could use the default error overlay?

$this->error(new XenForo_Phrase('please_enter_message_with_no_more_than_x_characters', array('count' => $maxLength)), 'message');


Active member
I don't think 'error' is a valid Controller method, and that's where I'm looking to use this functionality.

But following on from this, I can return a responseError() to achieve the same thing. Thanks for the tip!