New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating widget area work for ACP but not present in forum html #3743

Closed
panpansh opened this Issue Oct 10, 2015 · 3 comments

Comments

Projects
None yet
5 participants
@panpansh

panpansh commented Oct 10, 2015

I have defined a widget area footer fixed like that :

Added to /nodebb-theme-material/lib/theme.js

theme.defineWidgetAreas = function(areas, callback) {
    areas = areas.concat([
        {
            'name': 'Footer fixed',
            'template': 'footer-fixed.tpl',
            'location': 'bottom'
        }
    ]);

    callback(null, areas);
};

Added to /nodebb-theme-material/plugin.json

{
        "hook": "filter:widgets.getAreas", "method": "defineWidgetAreas", "callbacked": true
}

created /nodebb-theme-material/templates/footer-fixed.tpl

<div widget-area="bottom"></div>

I can see a new widget area and I can put widgets on it.
But when the page is loaded and check for widget html code by the chrome devlopper tool, I can see nothing :/

Any help is welcome :)

@pitaj

This comment has been minimized.

Contributor

pitaj commented Oct 11, 2015

You need something like the following I think:

<div widget-area="bottom">
    <!-- BEGIN widgets -->
    {widgets.html}
    <!-- END widgets -->
</div>

Look here for more examples

@panpansh

This comment has been minimized.

panpansh commented Oct 14, 2015

content of /nodebb-theme-material/templates/footer-fixed.tpl
replaced by :

<div widget-area="bottom">
    <!-- BEGIN widgets -->
    {widgets.html}
    <!-- END widgets -->
</div>

And I have the same issue

@julianlam

This comment has been minimized.

Member

julianlam commented Dec 31, 2015

Please ask in the community forum 😄

https://community.nodebb.org

@julianlam julianlam closed this Dec 31, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment