Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top Nav Bar > Get External Link URL Text Like Autonav #10742

Closed
wants to merge 2 commits into from

Conversation

ccmEnlil
Copy link
Contributor

@ccmEnlil ccmEnlil commented Jul 4, 2022

This PR implements a new Top Nav Bar block controller method to get us clean external link url text from external link pages that appear in the nav, similar to how the core autonav block renders external links.

This should solve the issues at https://forums.concretecms.org/t/url-in-top-navigation-bar-block-including-full-site-path/3361 where additional description of the issues can be found...

get explicit link text from external link collections, to target anchors, like core autonav block
get external link text for url like autonav
@ccmEnlil
Copy link
Contributor Author

ccmEnlil commented Jul 4, 2022

By all appearances X links can't have children. Not added/copied/moved through sitemap anyway. Maybe the third (first) instance in the view should be replaced as well to cover tweak cases where an external link somehow has a child...

@ccmEnlil
Copy link
Contributor Author

ccmEnlil commented Jul 8, 2022

This can be seen working v9.1.1 at https://juspimpin.com, where clicking external or external 2 in the top nav will do exactly as the autonav directly below it does. In this test case I give both external link pages a url of '#link', and use @mlocati empty anchor MP package in a global footer area to create the anchor.

@ccmEnlil
Copy link
Contributor Author

Note the core Page List block appears to be rendering anchor links in this manner as well. (Correctly like autonav)

Which is pretty cool, and unknown to me until now. We can build "lists" of external links in the sitemap and display them as page lists that link to sections of any page (or the x links), using dates and descriptions as applied to the external link pages themselves!

Haven't gotten any response from @rosie607 in the forums but I'm certain this solves the issue / introduces the functionality @rosie607 is looking for...

@ccmEnlil
Copy link
Contributor Author

Closing in favor of #10776

@ccmEnlil ccmEnlil closed this Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants