XF 2.2 How to remove notice wrapper?

Earl

Well-known member
Is there a way to display a specific notice without the wrapper?

I have this in my Listener.php

PHP:
    public static function noticeSetup(\XF\Pub\App $app, \XF\NoticeList $noticeList, array $pageParams)
    {
        $visitor = \XF::visitor();
        $templater = $app->templater();

        $noticeList->addNotice('install_app_invite', 'bottom_fixer',
            $templater->renderTemplate('public:earl_testpad_installapp', $pageParams),[
                'dismissible' => true,
//                'display_style' => 'custom',
//                'css_class' => 'offCanvasMenu-installBanner js-installPromptContainer notice-none',
                'css_class' => 'test',
                'wrap' => false,

            ]);

    }

this 'wrap'=> false line does not change anything. :(

What I'm trying to do is creating a notice to invites people to install the PWA app.

Edit: can not post question-type threads in this section...
 
Last edited:
Solution
By wrapper do you mean the styling?

If so, you can specify a custom CSS class name like so:
1612051979293.png

Then add to the extra.less template, or your add-on less template:
Less:
.noticeNoWrapper
{
    border: none;
}

That seems to remove all of the standard styling.

Brogan

XenForo moderator
Staff member
By wrapper do you mean the styling?

If so, you can specify a custom CSS class name like so:
1612051979293.png

Then add to the extra.less template, or your add-on less template:
Less:
.noticeNoWrapper
{
    border: none;
}

That seems to remove all of the standard styling.
 
Solution
Top