Currently, CSS and JS added in head section
But I want to add in the footer. In which I need to put the css and js?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
script layout xml tag will only work inside
head I think you'll need to create a block as a child of
before.body.end and load your CSS/JS files manually there.
Alternatively you could do that directly in layout XML like this:
Although that wouldn't work well for local assets as you'd have to hard code the pub/media URL which wouldn't work if you have versioning enabled.