Skip to content
This repository has been archived by the owner on Nov 2, 2022. It is now read-only.

Commit

Permalink
Create companias section page
Browse files Browse the repository at this point in the history
  • Loading branch information
zarathustra323 committed Aug 14, 2019
1 parent 157a303 commit dd4db89
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
1 change: 1 addition & 0 deletions sites/mundopmmi/config/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
],
Expand Down
6 changes: 6 additions & 0 deletions sites/mundopmmi/server/routes/website-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down
43 changes: 43 additions & 0 deletions sites/mundopmmi/server/templates/website-section/companias.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { getAsObject } from '@base-cms/object-path';

$ const { site } = out.global;
$ const section = getAsObject(data, 'section');

<theme-default-website-section-layout section=section>
<@head>
<endeavor-ad-gam-head />
</@head>

<@above-container>
<endeavor-gam-ad-unit-out-of-page name="wa" />
<endeavor-gam-ad-unit-out-of-page name="reskin" />
<endeavor-gam-ad-unit-define-display name="lb1" modifiers=["top-of-page"] />
</@above-container>

<div class="page-wrapper mb-block">
<div class="row">
<div class="col">
<div class="page-wrapper__header">
<endeavor-breadcrumbs-website-section section=section />
<h1 class="page-wrapper__title">${section.name}</h1>
<if(section.description)>
<p class="page-wrapper__description">${section.description}</p>
</if>
</div>
</div>
</div>
</div>

<@below-container>
<div class="published-content-query-load-more">
<endeavor-published-content-query
query={
contentTypes: ["Company"],
limit: 100,
}
item={ imageUsePlaceholder: false }
layout="event"
/>
</div>
</@below-container>
</theme-default-website-section-layout>

0 comments on commit dd4db89

Please sign in to comment.