Skip to content
Snippets Groups Projects
Unverified Commit 8f1bf050 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix

parent c41ee620
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ class Communication::Website::Configs::Permalinks < Communication::Website
def permalinks_data
@permalinks_data ||= begin
# TODO : Clean
data = Communication::Website::Permalink.config_in_website(website)
data = Communication::Website::Permalink.config_in_website(self)
data[:categories] = "#{self.special_page(:communication_posts).path_without_language}:slug/" if has_communication_posts? && has_communication_categories?
data[:organizations] = "#{self.special_page(:organizations).path_without_language}:slug/" if has_organizations?
data[:diplomas] = "#{self.special_page(:education_diplomas).path_without_language}:slug/" if has_education_diplomas?
......
......@@ -18,7 +18,7 @@ class Communication::Website::Permalink::Author < Communication::Website::Permal
about.for_website?(website)
end
def computed_path
def published_path
pattern.gsub(":slug", about.slug)
end
end
......@@ -2,9 +2,12 @@ url: "<%= @about.permalinks.for_website(@website).current.first.path %>"
<% if @about&.slug %>
slug: "<%= @about.slug %>"
<% end %>
<% if @about.permalinks.any? %>
<%
past_permalinks = @about.permalinks.for_website(@website).not_current
if past_permalinks.any?
%>
aliases:
<% @about.permalinks.for_website(@website).not_current.each do |permalink| %>
<% past_permalinks.each do |permalink| %>
- <%= permalink.path %>
<% end %>
<% end %>
---
title: "<%= @about.name %>"
<%= render 'admin/application/static/permalink' %>
<%#= render 'admin/application/static/permalink' %>
<% if @about.parent %>
parent: "<%= @about.parent.path %>"
<% 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