Skip to content

Commit

Permalink
Bloc formation : correction du path (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisben authored Dec 9, 2024
1 parent 7d703a1 commit 1b84a12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions layouts/partials/blocks/templates/programs.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{ if eq $block.data.layout "grid" }}
<div class="programs-grid">
{{ range .programs }}
{{ $program := site.GetPage (printf "/programs%s" .path) }}
{{ $program := site.GetPage .path }}
{{ $title := $program.Title | safeHTML }}
<article class="program" itemscope itemtype="https://schema.org/EducationalOccupationalProgram">
<div class="program-content">
Expand Down Expand Up @@ -51,11 +51,10 @@

{{ if and $program.Params.image $options.image }}
<div class="media">
{{ partial "commons/image.html"
(dict
"image" $program.Params.image
"sizes" site.Params.image_sizes.blocks.programs
) }}
{{ partial "commons/image.html" (dict
"image" $program.Params.image
"sizes" site.Params.image_sizes.blocks.programs
)}}
</div>
{{ end }}
</article>
Expand Down
7 changes: 3 additions & 4 deletions layouts/partials/locations/template-program.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
</div>
<div class="media">
{{- if $program.Params.image -}}
{{- partial "commons/image.html"
(dict
"image" $program.Params.image
"sizes" site.Params.image_sizes.sections.programs.item
{{- partial "commons/image.html" (dict
"image" $program.Params.image
"sizes" site.Params.image_sizes.sections.programs.item
) -}}
{{- end -}}
</div>
Expand Down

0 comments on commit 1b84a12

Please sign in to comment.