Jump to content

Vivaz hook for background image css per page


Equity
Go to solution Solved by Alejandro,

Recommended Posts

Hi Alejandro,

Using the below vivaz hook for background image how do I make this work only for a single page, not all pages?

When I do this by hard coding to the template "Background Images" as a param setting, the template recognizes this only for the menu item set on the individual background, not all pages, but the hook shows the css on all pages.

Guessing I need a condition using the page <body> class to make this work but have no idea how to get it.

AND: For some reason I can't find our discussion on this.

Thanks

Daniel

Clickfwd\Vivaz\Vivaz::filter('showcase:background_image_css.header', function ($css, $bgImage) {
    $css['background-image'] = 'linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)), '. $css['background-image'];

    return $css;
});
Link to comment
×
×
  • Create New...