}
+/**
+ * Populate common navLinks for page templates.
+ * @param {Number} pagePathLevel
+ * @param {Object} ctx
+ * @param {Object} options
+ */
+function navLinks(pagePathLevel, ctx, options) {
+ if (!options.navLinks) {
+ options.navLinks = [];
+ }
+ const rootPath = '../'.repeat(pagePathLevel);
+
+ if (options.pageIdentifier !== 'admin') {
+ options.navLinks.push({
+ text: 'Admin',
+ href: `${rootPath}admin/`,
+ });
+ }
+ if (options.pageIdentifier !== 'ticketProffer') {
+ options.navLinks.push({
+ text: 'Ticket',
+ href: `${rootPath}admin/ticket`,
+ });
+ }
+}
+
module.exports = Object.assign(Object.create(TemplateHelper), {
escapeCSS,
scopeCompare,
+ navLinks,
});
\ No newline at end of file