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

Navigation and Breadcrumb #1

Open
lagostinelli opened this issue Sep 23, 2015 · 4 comments
Open

Navigation and Breadcrumb #1

lagostinelli opened this issue Sep 23, 2015 · 4 comments

Comments

@lagostinelli
Copy link

Top Navigation is currently built based on Structure Group Name:
• If a SG has the number it will be displayed in the Top Navigation
• Value displayed is the Name of the SG.
• Index pages do not require number (“000”) in order to be displayed in the Top Navigation; they are identified by using “index” as File Name.

This implies that

  • in order to translate the Main Navigation, Structure Groups will have to be localized.
  • “Short Title” Metadata field (on main component of the page), used to override Navigation value displayed, does not apply for Top Navigation, but it’s only displayed in the browser tab.

In the attached example:
topnavigation

  • Browser displays value from Short Title metadata field (if filled in, other ways it displays the Heading of the main component)
  • Top Navigation displays value from Structure Group Name
  • Page displays the value from the Heading field of its main component

Breadcrumb is built based on both Structure Group Name and Heading field of the component in the Page.

In the attached example:
breadcrumb

  • First link (“About”) matches with the Structure Group Name and links to the Index page of that SG
  • Second link (“Company Information”) matches with the Heading of the main component of the Index Page and it’s related to the very same page as the previous one
  • If user clicks on the first link in the breadcrumb (About), the second link (“Company Information”) disappears and the link in the left Navigation is no longer highlighted, but we are still in the same page

Suggested updates:

  • Top Navigation, Left Navigation, Browser and Breadcrumb should always display by default value from the Heading field of the main component of the page
  • Short Title metadata field, when filled-in, should be displayed on Top Navigation, Left Navigation, Browser Tab and Breadcrumb
  • Breadcrumb should always displays values coming from Heading field of main component (if Short Title metadata field is not filled-in):
    • In case of first level page (Index Page within a first level Structure Group), only 1 link should be displayed (not clickable when visitor is on the Index Page)
    • In case of second level pages (any other page within the same Structure Group) the link to the correspondent Index Page (clickable) should be displayed, followed by the one related to the current page (not clickable)

This would make the logic to manage all Navigational items very consistent and easier for the editors and it would avoid Structure Group localization for translation purpose.

@bkoopman
Copy link
Contributor

Can you elaborate on how you would like to determine what the "main" Component of a Page exactly is?

Please note that currently these is no such concept in DXA. For so called localizable navigation, it currently looks for a configured field and uses the first available Component on the Page that has this information. See http://docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v2/GUID-1C757CEB-3773-4DAC-8A3F-68D8B2F02097

@bkoopman bkoopman self-assigned this Sep 23, 2015
@lagostinelli
Copy link
Author

Hello Bart,
with main component I mean the very same component (the first available component on the page) that is currently used to extract and display navigation text.
Basically the only difference is that also for the Top Navigation the text displayed should come from the first component (Heading or Metadata Short Title) inserted in the Index Page of the Structure Group.

@jhorsman
Copy link

Good find @luca, and you described this issue in great detail! I agree the Top Navigation should be component based.

To add some more (technical) info to your descirption: All DXA navigation comes from the sitemap, published with the "_Navigation" page. The top navigation and a couple of nodes from the breadcrumb are coming from the structure group (SG) level in this navigation. The last node in the breadcrumb, the left navigation and page title are coming from the page level in the navigation.

See this example navigation data used by DXA. https://gist.github.com/jhorsman/60dc0b13ca5ba8f5c51b

The Title for the page level in the navigation is coming from the component fields. For example the "Cras vel justo semp" page (tcm:7-594-64).
The Title for the SG level in the navigation is from the SG title like you mentioned in this issue. For example the Articles Structure group (tcm:7-1132-4).

The difference between page and SG level is that for the SG the component fields are one level further away. For a page it is obvious which components are on the page, for a SG there needs to be a lookup of the index page, and fallback logic in case there is no index page.

@rpannekoek
Copy link
Contributor

TSI-1950 (internal issue ID for tracking purposes)

@rpannekoek rpannekoek added this to the v2.2 milestone Dec 18, 2018
@rpannekoek rpannekoek removed this from the v2.2 milestone Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants