akashacms-breadcrumbs
Advanced tools
Comparing version 0.1.13 to 0.1.14
22
index.js
@@ -28,3 +28,15 @@ /** | ||
config.root_partials.push(path.join(__dirname, 'partials')); | ||
if (config.mahabhuta) { | ||
config.mahabhuta.push(function(config, $, metadata, done) { | ||
$('breadcrumb-trail').each(function(i, elem) { | ||
$(this).replaceWith(akasha.partialSync(config, "breadcrumb-trail.html.ejs", { | ||
breadcrumbs: breadcrumbTrail(akasha, config, metadata.documentPath) | ||
})); | ||
}); | ||
done(); | ||
}); | ||
} | ||
config.funcs.breadcrumbsSync = function(arg, callback) { | ||
throw new Error("Should not call breadcrumbsSync"); | ||
// util.log('breadcrumbsSync '+ util.inspect(arg)); | ||
if (!arg.documentPath) { callback(new Error("No 'documentPath' given ")); } | ||
@@ -36,4 +48,4 @@ var val = akasha.partialSync(config, "breadcrumb-trail.html.ejs", { | ||
return val; | ||
} | ||
} | ||
}; | ||
}; | ||
@@ -45,3 +57,3 @@ var crumb = function(akasha, entry) { | ||
}; | ||
} | ||
}; | ||
@@ -72,3 +84,3 @@ /** | ||
while (! quitLoop) { | ||
// util.log('*** trying ' + dirname); | ||
// util.log('*** trying "' + dirname +'"'); | ||
var indx = akasha.findIndexFile(config, dirname); | ||
@@ -86,3 +98,3 @@ if (indx) { | ||
return breadCrumbData; | ||
} | ||
}; | ||
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.1.13", | ||
"version": "0.1.14", | ||
"engines": { | ||
@@ -17,0 +17,0 @@ "node": ">=0.10.1" |
4793
85