Skip to content
Snippets Groups Projects
Commit 850224ca authored by alexisben's avatar alexisben
Browse files

handle category option

parent 9865b2c3
No related merge requests found
{{- $block := .block }}
{{- $block_class := partial "GetBlockClass" .block -}}
{{- with .block.data -}}
{{- $show_summary := .show_summary -}}
{{- $show_category := .show_category -}}
{{- $show_status := .show_status -}}
{{- $layout := .layout | default "list" -}}
<div class="{{ $block_class }}">
<div class="container">
<div class="block-content">
{{ $events_link := false }}
{{ $events_page := site.GetPage "/events" }}
{{ $events_link = $events_page.Permalink }}
{{ $link := $events_page.Permalink }}
{{ if .category }}
{{ $term := site.GetPage (printf "/posts_categories%s" .category) }}
{{ $link = $term.Permalink }}
{{ end }}
{{ partial "blocks/top.html" (dict
"title" $block.title
"heading_level" $block.ranks.self
"description" .description
"link" $events_link
"link" $link
)}}
{{ if .events }}
......
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