Ad

How To Hide Footer On Customized Rails 404 Page In Liquid Shopify Template

- 1 answer

I am working on a rails website with views made predominantly with liquid shopify. I customized the default rails 404 error message to something more dynamic that would display an animation and the top menu of the website. My new error pages are named not_found.html.erb and internal_server_error.html.erb. Aside the top menu that displays automatically on the new error page, the footer displays as well and i want to take it out. The top menu and the footer are liquid templates. I want to take out the liquid footer on only the two error pages i mentioned above.

Ad

Answer

I fixed it by changing the erb templates to liquid. Then i put this as the first line in the views that i changed from erb to liquid.

<style>
   footer { display:none; }
</style>

`

Ad
source: stackoverflow.com
Ad