From aaf70c7259088d1c98c20749c7751ab17458e577 Mon Sep 17 00:00:00 2001 From: nileshgnagepatil Date: Wed, 4 Oct 2023 13:18:01 +0100 Subject: [PATCH] Merged the if conditions --- .../Views/Content/Index.cshtml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Childrens-Social-Care-CPD/Views/Content/Index.cshtml b/Childrens-Social-Care-CPD/Views/Content/Index.cshtml index 63296893..64646091 100644 --- a/Childrens-Social-Care-CPD/Views/Content/Index.cshtml +++ b/Childrens-Social-Care-CPD/Views/Content/Index.cshtml @@ -42,22 +42,17 @@ @_relatedContentRenderer.Render(Model.RelatedContent) @section Scripts { - @if (ViewData.TryGetValue("StateModel", out var stateModel)) + @if (ViewData.TryGetValue("StateModel", out var stateModel) && ((StateModel)stateModel).IncludeMediaPlayer) { - if (((StateModel)stateModel).IncludeMediaPlayer) - { - - - } + + } } @section Head { - @if (ViewData.TryGetValue("StateModel", out var stateModel)) + @if (ViewData.TryGetValue("StateModel", out var stateModel) && ((StateModel)stateModel).IncludeMediaPlayer) { - if (((StateModel)stateModel).IncludeMediaPlayer) - { - - } + + } } \ No newline at end of file