Atasco Osage Posted December 15, 2017 Posted December 15, 2017 The way I code, I like to make my code as tiny as possible, and to repeat myself as little as possible. Since my website has an identical head and footer for like 99% of every page I plan to make, what kind of solution do you think I should use? A long time ago I'd used php includes, but eventually I learned more about php and learned to immensely dislike it hahaha. Is there a similar way to do this with rails or another solution?
Bailey Posted December 15, 2017 Posted December 15, 2017 You can use the w3school's html include. I'll find the link for you [Edit: Link below ]. https://www.w3schools.com/howto/howto_html_include.asp Or you can use frameworks but I would recommend this option.
Krydos Posted December 15, 2017 Posted December 15, 2017 Django is pretty cool. If I was to rebuild the HelioHost homepage again from the ground up I would strongly consider using Django.
Atasco Osage Posted December 15, 2017 Author Posted December 15, 2017 I see :0 ! Html includes sound useful, but it might be problematic if they have javascript disabled. Plus, most of that repeated information is header stuff that wouldn't be easy to offload in that way.I'll have to look up Django though :0
Bailey Posted December 15, 2017 Posted December 15, 2017 I doubt you'd have to worry about JavaScript because hardly anyone has it disabled now but you can include a "Please enable JavaScript to view content".
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now