I have had similar cache related issues with display:none. As you suggest, very good reasons for using that neat php solution. A fixed solution. Nice.
I have had similar cache related issues with display:none. As you suggest, very good reasons for using that neat php solution. A fixed solution. Nice.
And yet those cache issues ought to be temporary in the large scheme of things, unless there is some reason to modify the layout of a web page frequently (outside of initial/periodic development/revision) when would such a change be implemented. Further if php mod is the solution, then there is a lot of wasted processing used on implementing the unused portions of the css lookup for those type overrides.
My point being that every modification made to the source code is one more opportunity for something to go wrong during an upgrade where the process is essentially to replace the old files with the new files for functionality, and css used for display control provided the content being controlled is acceptable to be available (displayed or hidden) to everyone that can get to the page(s).
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I use per-page CSS stylesheets on almost every template I design and great for implementing different appearances for different pages.
No solution is right or wrong as long as it works as intended IMHO
The HTML code added modifies the source code anyways, hence the suggestion to simply wrap it in the awesome and under utilized BUILT-IN: $this_is_home_page and $current_page_base functions of zen-cart.
I'm also pretty sure I've seen posts in the responsive template threads by the OP and this solution is even better for it will never be processed on any other page but the home page instead of processing it and then hiding it.
Last edited by rbarbour; 13 Oct 2014 at 11:33 PM.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
The only documentation on these functions that I'm aware of is in /includes/templates/template_default/common/tpl_main_page.php
Their is this, it focuses mainly on disabling left/right columns but the concept is the same.