Skip to content
Snippets Groups Projects
Commit cff441e9 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

programs

parent 97484264
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,6 @@
<%= prepare_text_for_static element.person.summary, 6 %>
<% end %>
kind: "osuny"
path: "<%= element.person.slug %>"
slug: "<%= element.person.slug %>"
url: "<%= element.person.current_permalink_in_website(@website)&.path %>"
<% end %>
......@@ -15,6 +15,7 @@
<%= prepare_text_for_static element.title %>
summary: >-
<%= prepare_text_for_static element.summary, 6 %>
slug: "<%= element.slug %>"
path: "<%= element.path %>"
url: "<%= element.current_permalink_in_website(@website)&.path %>"
bodyclass: >-
......
......@@ -18,7 +18,7 @@
<%= prepare_text_for_static element.name %>
<% if element.organization %>
kind: "osuny"
path: "<%= element.organization.slug %>"
slug: "<%= element.organization.slug %>"
url: "<%= element.organization.current_permalink_in_website(@website)&.path %>"
logo:
<% if element.organization.logo.attached? %>
......
......@@ -14,6 +14,7 @@
<%= prepare_text_for_static element.title %>
summary: >-
<%= prepare_text_for_static element.summary, 6 %>
slug: "<%= element.slug %>"
path: "<%= element.path %>"
url: "<%= element.current_permalink_in_website(@website)&.path %>"
<% if element.best_featured_image.attached? %>
......@@ -28,6 +29,7 @@
<% element.categories.each do |category| %>
- title: >-
<%= prepare_text_for_static category.name, 8 %>
slug: "<%= category.slug %>"
path: "<%= category.path %>"
url: "<%= category.current_permalink_in_website(@website)&.path %>"
<% end %>
......@@ -35,7 +37,7 @@
author:
name: >-
<%= prepare_text_for_static element.author.name, 7 %>
path: "<%= element.author.slug %>"
slug: "<%= element.author.slug %>"
url: "<%= element.author.current_permalink_in_website(@website)&.path %>"
<% end %>
<% end %>
......@@ -2,4 +2,31 @@
<% block.template.elements.each do |element| %>
<% next unless element.program %>
- path: "<%= element.program.path %>"
<% end %>
elements:
<% block.template.elements.each do |element| %>
<% program = element.program %>
<% next unless program %>
- title: >-
<%= prepare_text_for_static element.program.name %>
summary: >-
<%= prepare_text_for_static element.program.summary, 6 %>
slug: "<%= program.slug %>"
path: "<%= program.path %>"
url: "<%= program.current_permalink_in_website(@website)&.path %>"
<% if program.best_featured_image.attached? %>
image:
id: "<%= program.best_featured_image.blob.id %>"
alt: >-
<%= prepare_text_for_static program.best_featured_image_alt, 7 %>
credit: >-
<%= prepare_html_for_static program.best_featured_image_credit, @website.university %>
<% end %>
<% diploma = program.diploma %>
<% if diploma.present? %>
diploma:
- title: >-
<%= prepare_text_for_static diploma.name %>
slug: "<%= diploma.slug %>"
url: "<%= diploma.current_permalink_in_website(@website)&.path %>"<% end %>
<% end %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment