Skip to content

Feature: friendly titles on success page for local blocks #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion layouts/_default/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 class="e-heading__4 c-objectives__title is-invisible">
{{ end }}
{{/* Deduplicate blocks */}}
{{ $blocks = $blocks | uniq }}
{{/* now we need to extract objectives from blocks not stored in this repo,
{{/* now we need to extract objectives from blocks, some not stored in this repo,
so we will use the block-data scratch function to get the block data
*/}}
{{ range $blocks }}
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/objectives/lookup.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{{ if (eq $scope.blockData.type "local_module") }}
{{ $localBlock = $pageContext.GetPage (replace $scope.blockData.api "%!s(<nil>)" .pageContext.Section) }}
{{ end }}
{{ $blockTitle := $localBlock.Page.Title }}
{{ with $localBlock.Page.Params.Objectives }}
<h5>{{ $scope.blockData.name }}</h5>
<h5>{{ $blockTitle | default $scope.blockData.name }}</h5>
{{ partial "objectives/block.html" . }}
{{ end }}