diff --git a/admin/app/views/commercial/liveBlogTopSponsorships.scala.html b/admin/app/views/commercial/liveBlogTopSponsorships.scala.html index d7c6b82bfe3e..c8e3d8161345 100644 --- a/admin/app/views/commercial/liveBlogTopSponsorships.scala.html +++ b/admin/app/views/commercial/liveBlogTopSponsorships.scala.html @@ -24,7 +24,7 @@

LiveBlog Top Sponsorships

  1. Is a Sponsorship
  2. Targets the
    liveblog-top
    slot
  3. -
  4. Targets the
    culture
    ,
    sport
    or
    football
    section
  5. +
  6. Targets the
    culture
    ,
    tv-and-radio
    ,
    sport
    or
    football
    section
  7. Targets the
    liveblog
    content type
  8. Targets the
    mobile
    breakpoint
  9. [Optional] Targets an edition
  10. diff --git a/common/app/common/dfp/DfpData.scala b/common/app/common/dfp/DfpData.scala index 624d2ddd349d..fcbfa41faf2f 100644 --- a/common/app/common/dfp/DfpData.scala +++ b/common/app/common/dfp/DfpData.scala @@ -76,6 +76,11 @@ case class CustomTarget(name: String, op: String, values: Seq[String]) { def isPlatform(value: String): Boolean = isPositive("p") && values.contains(value) def isNotPlatform(value: String): Boolean = isNegative("p") && values.contains(value) + def matchesLiveBlogTopTargeting: Boolean = { + val liveBlogTopSectionTargets = List("culture", "football", "sport", "tv-and-radio") + values.intersect(liveBlogTopSectionTargets).nonEmpty + } + val isHighMerchandisingSlot = isSlot("merchandising-high") val isLiveblogTopSlot = isSlot("liveblog-top") @@ -91,7 +96,7 @@ case class CustomTarget(name: String, op: String, values: Seq[String]) { val isSectionTag = isPositive("s") val isLiveBlogTopTargetedSection = - isSectionTag && (values.contains("culture") || values.contains("sport") || values.contains("football")) + isSectionTag && matchesLiveBlogTopTargeting } object CustomTarget {