Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from, be sure to visit to add the license to your account here on

Ticket: Passing value to children

Status Resolved
Add-on / Version Bloqs 1.4.2
EE Version 5.3.2

Johan Hedin

May 13, 2020

Hello, I’ve tried to solve this for a day now but can’t get it to work. I have created a template with a nav bar (mega menu). It has 3 levels of headings. In EE the nav bar is a nested block with the blocks “heading 1”, “heading 2” and “heading 3”. The navbar outputs perfectly with the headings (image). The problem is the links. In each block there is a relationship field that output the related entries URL-title. It works fine for the links on “heading 1” (segment 1), but when I create the link for “heading 2” it needs to pass the URL segment from “heading 1” and then add the URL-title (segment 2) for “heading 2”. And on “heading 3” I need to pass both segment 1 and segment 2.

I’ve tried a lot of different ideas. Tried Stash and probably could work somehow, but haven’t got it to work other than only outputing the first relationship value for the first loop (the value for the first “heading 1” block is given to all “heading 1” blocks). Is there any way I could fetch the values from the parent relationship field to its children?

<ul class="rd-navbar-nav">

{exp:channel:entries channel="x_huvudmenyn" dynamic="no" status="open"}

                            <li class="rd-nav-item"><a class="rd-nav-link" href="/sv/{lanka_sida:url_title}">{rubrik}</a>
                                {if "{blocks:children:total_blocks}" > 0}<ul class="rd-menu rd-navbar-megamenu">{/if}
                            {if "{blocks:children:total_blocks}" > 0}</ul><p>{/if}<br />
<p>                            {/close:header_1}<br />
                            {/header_1}    <br />
            <br />
                             {header_2}<br />
                             {if "{blocks:parent:shortname}" == "header_1"}</p><li class="rd-megamenu-item"><div><p>{/if}<br />
                                      {if "{blocks:parent:shortname}" == "header_2"}</p><div class="mt-5"><p>{/if}<br />
                                        </p><h5 class="rd-megamenu-title"><a href="/sv/<!-- pass value from header_1-->/{lanka_sida2:url_title}">{rubrik}</h5>
<p>                                        </p><ul class="rd-megamenu-list">
                             {close:header_2}</ul></div>{if "{blocks:parent:shortname}" == "header_1"}</li><p>{/if}<br />
                             {/close:header_2}<br />

<p>                            {header_3} <br />
                            </p><li class="rd-megamenu-list-item"><a class="rd-megamenu-list-link" href="/sv/<!-- pass value from header_1-->/<!-- pass value from header_2-->/{lanka_sida3:url_title}">{rubrik}</a></li><p>  <br />
                            {/header_3}   <br />
                         <br />
       {/huvudmenyn_bloq}<br />
{/exp:channel:entries}<br /></p>

Best regards,


BoldMinded (Brian)

May 13, 2020

You can’t pass field/atom values between blocks, unless nesting is enabled and you’re using block_vars


Johan Hedin

May 13, 2020

Nested is enabled, and I’m guessing that block-variables probably would work if it accepted relationships. Not tested the relationship field as it says its not supported, but It’s only a text-string..  Is there not any way around this?


BoldMinded (Brian)

May 13, 2020

The relationship field isn’t just a string, it stores data as an array. Unfortunately I don’t have any other recommendations, you’re attempting to do something pretty custom and outside the bounds of Bloqs’ functionality.


Johan Hedin

May 14, 2020

Okay, I understand. I’ll make top-level as a static URL that passes on to its children and have a less deep URL-structure.


Login to reply