Skip to content

Commit

Permalink
Merge pull request #650 from helsingborg-stad/3.0/fix/quicklinks-notices
Browse files Browse the repository at this point in the history
Fix: Quicklinks notice + post notice
  • Loading branch information
Anna authored Sep 8, 2023
2 parents 49dccea + cff60e8 commit 6eb3945
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/Helper/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function complementObject($postObject, $appendFields = [], $data =
$postObject->quicklinksPlacement = Navigation::getQuicklinksPlacement($postObject->ID);
$postObject->hasQuicklinksAfterFirstBlock = false;
$postObject->displayQuicklinksAfterContent = Navigation::displayQuicklinksAfterContent($postObject->ID);
if ($postObject->quicklinksPlacement == 'after_first_block' && has_blocks($postObject->post_content) && isset($data['quicklinksMenuItems'])) {
if (!empty($postObject->quicklinksPlacement) && $postObject->quicklinksPlacement == 'after_first_block' && has_blocks($postObject->post_content) && isset($data['quicklinksMenuItems'])) {
$postObject->displayQuicklinksAfterContent = false;
// Add quicklinks after first block
foreach (parse_blocks($postObject->post_content) as $key => $block) {
Expand Down
2 changes: 1 addition & 1 deletion views/v3/partials/navigation/fixed.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@if (!empty($quicklinksMenuItems) && $quicklinksPlacement !== 'after_first_block')
@if (!empty($quicklinksMenuItems) && !empty($quicklinksPlacement) && $quicklinksPlacement !== 'after_first_block')
@if (($customizer->quicklinksLocation == 'frontpage' && $isFrontPage) || $customizer->quicklinksLocation == 'everywhere')
@header([
'id' => 'quicklinks-header',
Expand Down

0 comments on commit 6eb3945

Please sign in to comment.