[bp:ModalDialog] out-of-the-box close button missing from templated header version

Hi,

I need to display a title in my ModalDialog and also display the close button that the non-templated ModalDialog has. How to achieve this?

A
image

would have been nice

Hi!

I think that you can add <bp:CloseDialogButton to the template anywhere you want it. There is also MaximizeDialogButton and RestoreDialogButton. For example this to replicate the default text header:

    <bp:ModalDialog ...>
        <HeaderTemplate>
            <span>Modal header text in template</span>
            <bp:CloseDialogButton />
        </HeaderTemplate>
        ...
    </bp:ModalDialog>

If you want to have custom icon (or text), you can place it inside the CloseDialogButton

It just works. Thank you.