Problem with navigation and container/container-fluid

Moved Technical Support
  • Hi

    I made my own theme as a fork of Lavender. To be able to have different "container" content classes on different pages, I moved the two following lines from the end of header.tpl to home.tpl, category.tpl and topic.tpl.

    <div class="container" id="content">
    <!-- IMPORT partials/noscript/warning.tpl -->
    

    Now, in home.tpl only I replaced container by container-fluid.
    My problem is that When I'm in browsing from a topic or a category to home (hitting the Home item in the breadcrumb), the layout doesn't change, and I see the home page with container instead of container-fluid.

    What should I do? Would separating the #content.container div into 2 levels of divs (#contentcontaining container) work?

  • Eh, my idea was correct I think. It seems that the browsing replace the content of #content with the other page #content, so splitting that into 2 divs works. Can anyone confirm this is how it works?

  • I know it does replace #content with the new page. So, you'd be better writing some JavaScript to change the class based on the template name.

  • Well, a client side Javascript would make the page change after it loaded, I don't want that.

    The problems I found with my currently implemented solution are that I've got an horizontal scrollbar (I should be able to fix that with some CSS somehow) and it seem to add another #content div when browsing... Which is wrong...

  • In the end, here are the only changes (to the original theme) I did to successfully achieve what I wanted without bug:

    1. Change container to container-fluid in header.tpl to set the "default" format to fluid.
    2. For each page that I want to be non-fluid, wrap the whole ***.tpl into a <div class="container"></div>.
      For example I did this for category.tpl, topic.tpl, register.tpl and login.tpl.

    It works.


Suggested Topics


  • Problems with upgrading to 2.xx

    Unsolved Technical Support
    0 Votes
    13 Posts
    299 Views
  • Plugin Recent Cards Problem

    Moved Solved Technical Support
    0 Votes
    7 Posts
    253 Views

    Hi all, what version did you downgrade from? The newest is likely for v3 of NodeBB only

  • 0 Votes
    2 Posts
    230 Views

    nodebb-plugin-customize will allow you to modify translations, including this one

  • 0 Votes
    2 Posts
    1k Views

    Remove config.json and run /.nodebb -setup... this is also happen for me if reboot my server.. and also sometimes my local install after reboot... I´am also hunting a solution!

  • 1 Votes
    1 Posts
    1k Views

    Hi guys!

    I have previous 0.5.0-2 version of forum on Heroku. It works fine. When I updated NodeBB to 0.6.1 version it crashed with error. Any ideas?

    2015-04-30T06:31:05.151177+00:00 heroku[web.1]: State changed from crashed to starting
    2015-04-30T06:31:12.946261+00:00 heroku[web.1]: Starting process with command npm start
    2015-04-30T06:31:16.159469+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
    2015-04-30T06:31:16.159494+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
    2015-04-30T06:31:16.817884+00:00 app[web.1]:
    2015-04-30T06:31:16.817890+00:00 app[web.1]: > [email protected] start /app
    2015-04-30T06:31:16.817892+00:00 app[web.1]: > ./nodebb start
    2015-04-30T06:31:16.817893+00:00 app[web.1]:
    2015-04-30T06:31:16.854535+00:00 app[web.1]: sh: 1: ./nodebb: Permission denied
    2015-04-30T06:31:16.873738+00:00 app[web.1]: npm ERR! Linux 3.13.0-49-generic
    2015-04-30T06:31:16.878037+00:00 app[web.1]: npm ERR! code ELIFECYCLE
    2015-04-30T06:31:16.878041+00:00 app[web.1]: npm ERR! [email protected] start: ./nodebb start
    2015-04-30T06:31:16.878043+00:00 app[web.1]: npm ERR! Exit status 126
    2015-04-30T06:31:16.878044+00:00 app[web.1]: npm ERR!
    2015-04-30T06:31:16.878046+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script './nodebb start'.
    2015-04-30T06:31:16.878048+00:00 app[web.1]: npm ERR! This is most likely a problem with the nodebb package,
    2015-04-30T06:31:16.878049+00:00 app[web.1]: npm ERR! not with npm itself.
    2015-04-30T06:31:16.878050+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
    2015-04-30T06:31:16.878052+00:00 app[web.1]: npm ERR! ./nodebb start
    2015-04-30T06:31:16.878054+00:00 app[web.1]: npm ERR! You can get their info via:
    2015-04-30T06:31:16.878693+00:00 app[web.1]: npm ERR! npm owner ls nodebb
    2015-04-30T06:31:16.878696+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
    2015-04-30T06:31:16.889120+00:00 app[web.1]:
    2015-04-30T06:31:16.899848+00:00 app[web.1]: npm ERR! /app/npm-debug.log
    2015-04-30T06:31:16.866363+00:00 app[web.1]:
    2015-04-30T06:31:16.874577+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
    2015-04-30T06:31:16.875101+00:00 app[web.1]: npm ERR! node v0.12.2
    2015-04-30T06:31:16.876089+00:00 app[web.1]: npm ERR! npm v2.7.4
    2015-04-30T06:31:16.897668+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
    2015-04-30T06:31:17.925842+00:00 heroku[web.1]: Process exited with status 1
    2015-04-30T06:31:17.938969+00:00 heroku[web.1]: State changed from starting to crashed