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

SUGCON 2024: Navigation Link Placeholder #455

Merged
merged 6 commits into from
Apr 19, 2024

Conversation

cheeto-bandito
Copy link
Contributor

Description / Motivation

The ButtonLink component in the Header Navigation was hard-coded and was not reusable for other SUGCON sites. To resolve this, I've done the following:

  1. Created a Placeholder Setting named Button Link that accepts the Link component as an Allowed Control
  2. Cloned the OOTB Headless SXA Navigation component
  3. Added the Button Link placeholder setting to the Layout Service Placeholders of the Navigation component
    image
  4. Created a Headless Variant on the Link component named Button
  5. Created a datasource item named Header CTA
  6. Added the Link component to the Header partial design with the appropriate placeholder and datasource from step 5

How Has This Been Tested?

  1. Serialized all of my content changes
  2. Cleaned the solution
  3. Redeployed all content to my local
  4. Loaded up Experience Editor and verified that the CTA renders properly
    image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the Contributing guide.
  • My code/comments/docs fully adhere to the Code of Conduct.
  • My change is a code change.
  • My change is a documentation change and there are NO other updates required.

Copy link
Collaborator

@lovesitecore lovesitecore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Chet, just reviewing this one. Seems I cannot find the Data source for the Header CTA. I checked the presentation details of the Header Partial Design and I can see it has the Link Component pointing to $site/Data folder. But as mentioned data source folder and item is missing. I wonder if I deploy the new app code now, if that will crash when it does not find the data source. I think we should have that checked in with the Code.

@cheeto-bandito
Copy link
Contributor Author

Hey Chet, just reviewing this one. Seems I cannot find the Data source for the Header CTA. I checked the presentation details of the Header Partial Design and I can see it has the Link Component pointing to $site/Data folder. But as mentioned data source folder and item is missing. I wonder if I deploy the new app code now, if that will crash when it does not find the data source. I think we should have that checked in with the Code.

I've made the requested changes and serialized the /Data/Links/Header CTA single item path.

@lovesitecore lovesitecore merged commit 33bb3bc into Sitecore:main Apr 19, 2024
7 checks passed
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.

2 participants