From dd4db89a8ef826a6009c7e642f6f5647322f7fb4 Mon Sep 17 00:00:00 2001 From: Jacob Bare Date: Wed, 14 Aug 2019 08:16:53 -0500 Subject: [PATCH] Create companias section page --- sites/mundopmmi/config/site.js | 1 + .../server/routes/website-section.js | 6 +++ .../templates/website-section/companias.marko | 43 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 sites/mundopmmi/server/templates/website-section/companias.marko diff --git a/sites/mundopmmi/config/site.js b/sites/mundopmmi/config/site.js index 5563bbef5..7b65e3b7e 100644 --- a/sites/mundopmmi/config/site.js +++ b/sites/mundopmmi/config/site.js @@ -73,6 +73,7 @@ module.exports = { label: 'Recursos', items: [ { href: '/autores', label: 'Autores' }, + { href: '/companias', label: 'Compañías' }, { href: '/eventos', label: 'Eventos' }, { href: '/videos', label: 'Vídeos' }, ], diff --git a/sites/mundopmmi/server/routes/website-section.js b/sites/mundopmmi/server/routes/website-section.js index 0ac4353e2..8fd8366cc 100644 --- a/sites/mundopmmi/server/routes/website-section.js +++ b/sites/mundopmmi/server/routes/website-section.js @@ -7,6 +7,7 @@ const automatizacionTemplate = require('../templates/website-section/automatizac const empaqueTemplate = require('../templates/website-section/empaque'); const procesamientoTemplate = require('../templates/website-section/procesamiento'); const eventosTemplate = require('../templates/website-section/eventos'); +const companiasTemplate = require('../templates/website-section/companias'); module.exports = (app) => { app.get('/:alias(contact-us)', withWebsiteSection({ @@ -34,6 +35,11 @@ module.exports = (app) => { queryFragment, })); + app.get('/:alias(companias)', withWebsiteSection({ + template: companiasTemplate, + queryFragment, + })); + submissionHandler(app); app.get('/:alias([a-z0-9-/]+)', withWebsiteSection({ template: section, diff --git a/sites/mundopmmi/server/templates/website-section/companias.marko b/sites/mundopmmi/server/templates/website-section/companias.marko new file mode 100644 index 000000000..97bb646d3 --- /dev/null +++ b/sites/mundopmmi/server/templates/website-section/companias.marko @@ -0,0 +1,43 @@ +import { getAsObject } from '@base-cms/object-path'; + +$ const { site } = out.global; +$ const section = getAsObject(data, 'section'); + + + <@head> + + + + <@above-container> + + + + + +
+
+
+
+ +

${section.name}

+ +

${section.description}

+ +
+
+
+
+ + <@below-container> +
+ +
+ +