Skip to content

Commit

Permalink
partial can't be cached...
Browse files Browse the repository at this point in the history
  • Loading branch information
VashJuan committed Sep 24, 2024
1 parent dbdb9f4 commit 7b85272
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 34 deletions.
7 changes: 2 additions & 5 deletions themes/eoconline/layouts/insights/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,10 @@
{{ partialCached "calendar" (dict "context" . "fromYear" $fromYear "fromMonth" $fromMonth "toYear" (now.Format "2006") "toMonth" (now.Format "1") "pages" .Site.Pages) }}


<!-- widget wrapper: only do Categories & Tags -->
<!-- widget wrapper: only do Categories & Tags - but partial can't then be cached... -->
{{ $widget:= site.Params.widgets.sidebarCT }}


<!-- widgetCT = $widget }} on page .Title }} -->

{{ partialCached "widgets/widget-wrapperCT" ( dict "Scope" . "Widgets" $widget ) }}
{{ partial "widgets/widget-wrapper" ( dict "Scope" . "Widgets" $widget ) }}

</div>
</div>
Expand Down
4 changes: 0 additions & 4 deletions themes/eoconline/layouts/partials/widgets/widget-wrapper.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{{ $scope := .context }}
{{ $widget := .Widgets }}


<!--incoming widget = $widget }} &&&& .Widgets | jsonify }}-->

{{ range $widget }}
<!-- Widget: . }} with scope: $scope.Title }}<br /-->
{{ partial ( print "widgets/" . ) $scope }}
{{ end }}
10 changes: 0 additions & 10 deletions themes/eoconline/layouts/partials/widgets/widget-wrapperCT.html

This file was deleted.

10 changes: 0 additions & 10 deletions themes/eoconline/layouts/partials/widgets/widget-wrapperTK.html

This file was deleted.

7 changes: 2 additions & 5 deletions themes/eoconline/layouts/resources2/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@

<!-- sidebar -->
<div class="lg:col-4">
<!-- widget - Only show Topics & Keywords -->
<!-- widget - Only show Topics & Keywords - but partial can't then be cached... -->
{{ $widget:= site.Params.widgets.sidebarTK }}


<!-- widgetTK = $widget }} on page .Title }} -->

{{ partialCached "widgets/widget-wrapperTK" ( dict "Scope" . "Widgets" $widget ) }}
{{ partial "widgets/widget-wrapper" ( dict "Scope" . "Widgets" $widget ) }}

</div>
</div>
Expand Down

0 comments on commit 7b85272

Please sign in to comment.