Jump to content

blocktopmenu not loading any CSS


Recommended Posts

I just installed the newest Prestashop. Copied the default theme to my own. Went to terminal and ran 'compass watch' to compile the SASS files. On refreshing the frontend I noticed that the menu doesn't have any CSS styling. First thought it might be a compile issue, but my theme has the css files. They are just not called when rendering.

 

In /themes/fairradio/css/modules/blocktopmenu/css

blocktopmenu.css and superfish-modified.css both exist and have the correct CSS.

 

It is just not rendered in the page at all.

 

Here is all the CSS that is rendered.

<link rel="stylesheet" href="/themes/fairradio/css/global.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/autoload/highdpi.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/autoload/responsive-tables.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/autoload/uniform.default.css" type="text/css" media="all" />
<link rel="stylesheet" href="/js/jquery/plugins/fancybox/jquery.fancybox.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/my-account.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockbanner/blockbanner.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockbestsellers/blockbestsellers.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockcart/blockcart.css" type="text/css" media="all" />
<link rel="stylesheet" href="/js/jquery/plugins/bxslider/jquery.bxslider.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockcategories/blockcategories.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockcurrencies/blockcurrencies.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blocklanguages/blocklanguages.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockcontact/blockcontact.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockmyaccountfooter/blockmyaccount.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blocknewproducts/blocknewproducts.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blocknewsletter/blocknewsletter.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blocksearch/blocksearch.css" type="text/css" media="all" />
<link rel="stylesheet" href="/js/jquery/plugins/autocomplete/jquery.autocomplete.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockspecials/blockspecials.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blocktags/blocktags.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockuserinfo/blockuserinfo.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockviewed/blockviewed.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/homefeatured/homefeatured.css" type="text/css" media="all" />
<link rel="stylesheet" href="/modules/themeconfigurator/css/hooks.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/blockwishlist/blockwishlist.css" type="text/css" media="all" />
<link rel="stylesheet" href="/themes/fairradio/css/modules/productcomments/productcomments.css" type="text/css" media="all" />

Any idea why its not rendering any CSS for the top menu?

Link to comment
Share on other sites

I have a feeling this is a cache issue, I went back to the unmodified default theme default-bootstrap and it doesn't load the css for blocktopmenu either. I know it did initially, but switching back to the default is not working either. I have verified Advanded Parameters > Performance > Force Compilation is checked and Cache is turned off. It just does not load any css for the blocktopmenu.

Link to comment
Share on other sites

  • 2 months later...

OK, I found solution.

 

I fact blocktopmenu.php load css and js only if you add your menu to header hook.

 

If you add it to other like Displaytop, css and js are not loaded ...

 

So you may only modify blocktopmenu.php to load css and js for hookDisplayTop.

 

For example like this :

 

    public function hookDisplayTop($param)
    {
        $this->hookHeader();
 

Link to comment
Share on other sites

1) "Modules and Services"

2) Search for "Top horizontal menu" > "Configure".

3) "Manage hooks" for me this page show 2 hooks "actionCategoryUpdate" and "displayTop"

4) "Transplant a module"

5) Add "Transplant to" > "Header" > "Save"

6) Refresh your front-office.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

1) "Modules and Services"

2) Search for "Top horizontal menu" > "Configure".

3) "Manage hooks" for me this page show 2 hooks "actionCategoryUpdate" and "displayTop"

4) "Transplant a module"

5) Add "Transplant to" > "Header" > "Save"

6) Refresh your front-office.

 

I think it's "displayHeader" not just "Header". However, thank you so much!

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...