Hi again
Yesterday was not on my computer ... so I could not copy this code. It is to show the categories in a 'grid' format, is not exactly what you ask, but you can use it like code basis…
This option does not require code changes nor load scripts. Once applied remains as follows:
All you have to do is 2 easy steps:
1.- Add some CSS properties to give the required format:
/* Set the position on the frontpage */
#frontpage-category-names,
#frontpage-category-names .course_category_tree {
clear: both; margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
/* Create box for each category */
.course_category_tree .category {
position: relative;
float: left;
width: 180px;
height: 180px;
margin: 1px 1px 1px 1px;
padding: 0px 0px 0px 0px;
border-width: 1px 1px 1px 1px;
border-style: solid;
border-color: #007EBA;
}
/* Adjust color for disabled categories */
.course_category_tree .category.dimmed_category {
border-color: #AAAAAA;
}
/* Adjust the position of the name */
.course_category_tree .category .info .name {
padding: 0px 0px 0px 0px;
text-align: center;
}
/* Hide icon 'colapsed' because it makes no sense here */
.course_category_tree .category > .info .name {background: none;}
.dir-rtl .course_category_tree .category > .info .name {background: none;}
.course_category_tree .category.with_children > .info .name {background: none;}
.course_category_tree .category.with_children.collapsed > .info .name {background: none;}
.dir-rtl .course_category_tree .category.with_children.collapsed > .info .name {background: none;
}
/* Place image in each category */
.course_category_tree .category[data-categoryid] {
background: url([[pix:theme|cat/default]]) no-repeat center bottom;
}
/* Upload the image from each category */
.course_category_tree .category[data-categoryid="1"] {background-image: url([[pix:theme|cat/1]]);}
.course_category_tree .category[data-categoryid="2"] {background-image: url([[pix:theme|cat/2]]);}
.course_category_tree .category[data-categoryid="3"] {background-image: url([[pix:theme|cat/3]]);}
.course_category_tree .category[data-categoryid="4"] {background-image: url([[pix:theme|cat/4]]);}
.course_category_tree .category[data-categoryid="5"] {background-image: url([[pix:theme|cat/5]]);}
.course_category_tree .category[data-categoryid="6"] {background-image: url([[pix:theme|cat/6]]);}
.course_category_tree .category[data-categoryid="7"] {background-image: url([[pix:theme|cat/7]]);}
.course_category_tree .category[data-categoryid="8"] {background-image: url([[pix:theme|cat/8]]);}
.course_category_tree .category[data-categoryid="9"] {background-image: url([[pix:theme|cat/9]]);}
.course_category_tree .category[data-categoryid="10"] {background-image: url([[pix:theme|cat/10]]);}
.course_category_tree .category[data-categoryid="11"] {background-image: url([[pix:theme|cat/11]]);}
.course_category_tree .category[data-categoryid="12"] {background-image: url([[pix:theme|cat/12]]);}
.course_category_tree .category[data-categoryid="13"] {background-image: url([[pix:theme|cat/13]]);}
.course_category_tree .category[data-categoryid="14"] {background-image: url([[pix:theme|cat/14]]);}
.course_category_tree .category[data-categoryid="15"] {background-image: url([[pix:theme|cat/15]]);}
.course_category_tree .category[data-categoryid="16"] {background-image: url([[pix:theme|cat/16]]);}
.course_category_tree .category[data-categoryid="17"] {background-image: url([[pix:theme|cat/17]]);}
.course_category_tree .category[data-categoryid="18"] {background-image: url([[pix:theme|cat/18]]);}
.course_category_tree .category[data-categoryid="19"] {background-image: url([[pix:theme|cat/19]]);}
.course_category_tree .category[data-categoryid="20"] {background-image: url([[pix:theme|cat/20]]);}
/* Hide subcategories in the GRID model */
.course_category_tree .category .content {display: none;}
/* Hide buttons to expand and collapse */
.jsenabled .course_category_tree .controls {display: none;}
2.- Use an existing folder or create a new one (in this example theme \ aigne \ pix \ cat) to copy the images to be used as icons/backgrounds/images. I highly recommend that the name of the image is the 'ID' of the category to easier make updates or changes.
You can also apply the option to a font of symbols (fontawesome, zurb, icomoon, etc ...) using selectors: before and: after. This option has become very popular lately and has a very nice visual effect, but does not convince me at all…
I hope this information will be useful
Greetings from Galicia