I'm trying to get subcategory.html display as 1 column on mobile and 3 columns on desktop.
I guess the css part of this can be done with media calls based on screen width, but I can't figure out how to set category_cols = 1 for mobile and categorycols = 3 for desktop.
Brewt's post contains the following code to add to category.html, which looks as though it might be something like needed, but it's based on categories rather than screen width:
<%set category_cols = 1%>
<style type="text/css">
#category dl {
width: 100%;
}
</style>
<%endif%>
I'm also running static, not dynamic. I'm wondering if it's possible to generate two versions of the category links (1 column version and 3 column version), and then hide whichever one is not required by css.
I wonder if anyone has done something like this.
Thanks,
--Jo
I guess the css part of this can be done with media calls based on screen width, but I can't figure out how to set category_cols = 1 for mobile and categorycols = 3 for desktop.
Brewt's post contains the following code to add to category.html, which looks as though it might be something like needed, but it's based on categories rather than screen width:
Code:
<%if category_id = 123 or category_id = 432%> <%set category_cols = 1%>
<style type="text/css">
#category dl {
width: 100%;
}
</style>
<%endif%>
I'm also running static, not dynamic. I'm wondering if it's possible to generate two versions of the category links (1 column version and 3 column version), and then hide whichever one is not required by css.
I wonder if anyone has done something like this.
Thanks,
--Jo