Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobunny committed Mar 30, 2016
1 parent d92fde9 commit a978f76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/src/modules/helpers.js
@@ -1,6 +1,6 @@
;(function(exports) {
"use strict";
/* globals define, utils */
/* globals define, utils, config */

// export the class if we are in a Node-like system.
if (typeof module === 'object' && module.exports === exports) {
Expand Down Expand Up @@ -102,11 +102,13 @@

helpers.generateChildrenCategories = function(category) {
var html = '';
var relative_path = (typeof config !== 'undefined' ? config.relative_path : require('nconf').get('relative_path'));

category.children.forEach(function(child) {
if (!child) {
return;
}
var link = child.link ? child.link : (config.relative_path + '/category/' + child.slug);
var link = child.link ? child.link : (relative_path + '/category/' + child.slug);
html += '<a href="' + link + '">' +
'<span class="fa-stack fa-lg">' +
'<i style="color:' + child.bgColor + ';" class="fa fa-circle fa-stack-2x"></i>' +
Expand Down

0 comments on commit a978f76

Please sign in to comment.