Referencing the Permalink of a Looper in a Condition

I’m creating a dropdown navigation menu that includes a series of pages. Each of the pages has a flyout menu linking to a post associated with that page. This is what it looks like.

Pages under Curricula have a custom ACF text field called common_course_url. This contains a portion of a post URL we’d like to associate with the page. This ACF field will contain a path like /lessons/algebra-pyret

The row structure looks like this:

ROW
    COLUMN - Looper Provider (Query Builder >  Posts: Page | Taxonomies: curricula_parent )
        DIV - Consumer (All)
            DIV - /*Curiculum Parent Page Button*/ Link URL: {{dc:post:permalink}}
            DIV - /*Flyout Menu*/ Condition {{ acf.post_field({"field":"common_course_url"}) }} is not empty
                DIV - /*Flyout Buttons Container*/ Looper Provider (Query Builder > Posts: Curriculum | Taxonomies: course)  & Condition  {{ acf.post_field({"field":"common_course_url"}) }} in {{ post.permalink }} /*This link should be the link of the Curriculum Post*/
                     BUTTON /*Lessons*/ Link URL: {{ post.permalink }}
                     BUTTON /*Workbooks*/ Link URL: {{ post.permalink }}#_student_workbooks
                     BUTTON /*Standard Alignments*/ Link URL: {{ post.permalink }}#_standard_alignments
                     BUTTON /*Other Resources*/ Link URL: {{ post.permalink }}#_other_resources

The top level pages under Curricula are working, but the flyout menu items are not. For example, if I click on Lessons link flyout next to Algebra, it takes me to the same link as Algebra.

I think the problem with the logic above is in the Flyout Buttons Container. When it’s looking for the condition {{ acf.post_field({“field”:“common_course_url”}) }} in {{ post.permalink }}, I think it’s looking if the common_course_url is in the Curriculum Parent Page permalink. This is wrong. It needs to look if the common_course_url is in the Permalink of the Curriculum posts in the Looper Provider.

My question is how can I bring the provider looper permalink into the conditions of the Flyout Buttons Container?

Hello @OctoCog,

Thanks for posting in! First, display the permalinks of the page inside DIV - Consumer. Then, another Text element that displays the permalink of each curriculum inside the nested looper. I think the buttons needs depth=0 like this: {{dc:post:permalink depth="0"}}. If this does not work, please provide us with your WP details so that we can check your looper settings. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Hi @ruenel

Thank you for your help! I tried adding {{dc:post:permalink depth=“0”}} for the buttons, but I didn’t have any luck with getting the post permalink to appear.

I sent you a secure note. You will be able to see the component under the name “Curricula Dropdown Module”. Just so you know the Algebra link should link to Algebra page here: https://bootstrapfostg.wpenginepowered.com/curricula/algebra/ and the Lessons link should link to: https://bootstrapfostg.wpenginepowered.com/materials/spring-2025/lessons/algebra-pyret/