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

[Nonprofit Navigation] Set initial site navigation links #495

Closed
shascher opened this issue Feb 26, 2024 · 5 comments
Closed

[Nonprofit Navigation] Set initial site navigation links #495

shascher opened this issue Feb 26, 2024 · 5 comments

Comments

@shascher
Copy link
Contributor

When a Nonprofit site is first created, the site navigation (header and footer) includes links to all published pages.

See #467 and Slack Convo for context. This issue requires that we override the core wp navigation array.

Desired

When a Nonprofit site is first created, the site navigation (header and footer) should include links to the Auctions page, About GOODBIDS page, and the Login / My Account button.

Tasks

  • Update navigation links to display the following:
    • About GOODBIDS -> Link to About GOODBIDS page
    • Auctions -> Link to Explore Auctions page
    • Login / My Account button (no change)

Image

Copy link

linear bot commented Feb 26, 2024

GOO-161 [Nonprofit Navigation] Set initial site navigation links

When a Nonprofit site is first created, the site navigation (header and footer) includes links to all published pages.

See #467 and Slack Convo for context. This issue requires that we override the core wp navigation array.

Desired

When a Nonprofit site is first created, the site navigation (header and footer) should include links to the Auctions page, About GOODBIDS page, and the Login / My Account button.

Tasks

  • Update navigation links to display the following:
    • About GOODBIDS -> Link to About GOODBIDS page
    • Auctions -> Link to Explore Auctions page
    • Login / My Account button (no change)

Image

@clatwell clatwell added blocked and removed blocked labels Feb 27, 2024
@clatwell
Copy link
Contributor

@nathan-schmidt-viget - Curious if this might be reasonably quick now that we've figured out the default pages stuff? This would be a huge win to get in tomorrow before admin testing!

@nathan-schmidt-viget
Copy link
Contributor

nathan-schmidt-viget commented Feb 29, 2024

@bd-viget so did some more research and it looks like WP is adding an option to render inner blocks inside of core/navigation. But it looks like it is only going to be for WP 6.5

  1. Block Hooks API: Update Navigation block feature gate WordPress/gutenberg#58388
  2. Update Navigation block to render hooked inner blocks WordPress/gutenberg#57754

Wonder if we can do something similar.

@nathan-schmidt-viget
Copy link
Contributor

Maybe a bit hacking, but found that we can do the mark up in the view like this and it renders. As well as being editable in Gutenberg. Sooooo we could be able to do the same thing and just input our newly created pages.

<!-- wp:navigation -->
  <!-- wp:navigation-link {"label":"test","type":"page","id":43,"url":"http://nonprofit.goodbids.vipdev.lndo.site/my-account/","kind":"post-type"} /-->
  <!-- wp:navigation-link {"label":"test","type":"page","id":40,"url":"http://nonprofit.goodbids.vipdev.lndo.site/shop/","kind":"post-type"} /-->
<!-- /wp:navigation -->

nathan-schmidt-viget added a commit that referenced this issue Mar 1, 2024
@nathan-schmidt-viget
Copy link
Contributor

Got this up in a draft PR, two things left to figure out. But it is 90% done!

bd-viget added a commit that referenced this issue Mar 6, 2024
* [#495] Setting up basic test with nav links

* [#495] testing out pattern for custom menu

* [#495] pulling in the created pages into the new nav

* [#495] adding notes for TODO

* [#495] getting active nav post id

* [#495] A couple of tweaks, potential bug fixes

* [#495] Some fixes/adjustments

* [#495] Used Verified hook for Navigation Changes

* [#495] Fix nav + other bug fixes

---------

Co-authored-by: Nathan Schmidt <[email protected]>
nathan-schmidt-viget added a commit that referenced this issue Mar 6, 2024
* [#495] Setting up basic test with nav links

* [#495] testing out pattern for custom menu

* [#495] pulling in the created pages into the new nav

* [#495] adding notes for TODO

* [#495] getting active nav post id

* [#495] A couple of tweaks, potential bug fixes

* [#495] Some fixes/adjustments

* [#495] Used Verified hook for Navigation Changes

* [#495] Misc Fixes (#591)

* [#495] Setting up basic test with nav links

* [#495] testing out pattern for custom menu

* [#495] pulling in the created pages into the new nav

* [#495] adding notes for TODO

* [#495] getting active nav post id

* [#495] A couple of tweaks, potential bug fixes

* [#495] Some fixes/adjustments

* [#495] Used Verified hook for Navigation Changes

* [#495] Fix nav + other bug fixes

---------

Co-authored-by: Nathan Schmidt <[email protected]>

---------

Co-authored-by: Brian DiChiara <[email protected]>
Co-authored-by: Brian DiChiara <[email protected]>
@clatwell clatwell closed this as completed Mar 8, 2024
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

No branches or pull requests

3 participants