Skip to content

Commit

Permalink
Merge pull request #1014 from dpc-sdp/feature/R20-1742-before-results…
Browse files Browse the repository at this point in the history
…-content

[R20-1742] add support for content 'before' results
  • Loading branch information
lambry authored Feb 12, 2024
2 parents ba157e6 + cfa61fb commit 540a6e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type { rplEventPayload } from '@dpc-sdp/ripple-ui-core'
import { watch } from 'vue'
interface TideContentPage extends TidePageBase {
beforeResults: string
afterResults: string
secondaryCampaign: ITideSecondaryCampaign
}
Expand Down Expand Up @@ -386,6 +387,12 @@ watch(
</RplHeroHeader>
</template>
<template #body>
<RplPageComponent v-if="contentPage.beforeResults">
<RplContent
class="tide-content-before-results"
:html="contentPage.beforeResults"
/>
</RplPageComponent>
<TideSearchAboveResults
v-if="results?.length || (sortOptions && sortOptions.length)"
>
Expand Down
2 changes: 2 additions & 0 deletions packages/ripple-tide-search/mapping/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ const tideCollectionModule: IRplTideModuleMapping = {
withSidebarSocialShare: false
}),
summary: 'field_landing_page_summary',
beforeResults: (src: string) =>
getBodyFromField(src, 'field_above_results_content'),
afterResults: (src: string) =>
getBodyFromField(src, 'field_below_results_content'),
introText: 'field_landing_page_intro_text',
Expand Down

0 comments on commit 540a6e6

Please sign in to comment.