Skip to main content
January 17, 2025
Solved

I want to modify breadcrumbs

  • January 17, 2025
  • 6 replies
  • 0 views

Hi all

please help me modify my code to give 3 breadcrumbs as I have achieved to give 3 breadcrumbs but on clicking on 2nd I'm coming back to 2nd but clicking on 1st I'm not able to come back to 1st.

I attached my code where there are 3 rule inputs , in which showsubmodule and show pdf is boolean and selection is list of number

 

{
  a!localVariables(
    local!currentNodeId: if(
      ri!showSubModule = true,
      if(ri!showPDF, 3, 2),
      1
    ),
    local!nodes: a!forEach(
      items: enumerate(local!currentNodeId) + 1,
      expression: choose(
        fv!item,
        a!map(name: "Knowledge Base", identifier: 1),
        a!map(name: "Sub Modules", identifier: 2),
        a!map(name: "Show PDF", identifier: 3)
      )
    ),
    a!cardLayout(
      contents: {
        a!richTextDisplayField(
          labelPosition: "COLLAPSED",
          value: {
            a!forEach(
              items: local!nodes,
              expression: if(
                fv!isLast,
                a!richTextItem(text: fv!item.name, style: "STRONG"),
                {
                  a!richTextItem(
                    text: fv!item.name,
                    link: a!dynamicLink(
                      value: fv!item.identifier,
                      saveInto: {
                        a!save(ri!showPDF,false),
                        a!save(ri!selection, null),
                      }
                    ),
                    linkStyle: "STANDALONE"
                  ),
                  a!richTextItem(text: "  /  ", color: "SECONDARY")
                }
              )
            )
          }
        )
      },
      showBorder: false
    )
  )
}

Help me achieve this

thankyou!

[mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] [mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05] 

    Best answer by stefanhelzle0001

    This is so confusing!?! Why not just show all three items and use some conditional logic in the showWhen to make them visible?

    6 replies

    stefanhelzle0001
    January 17, 2025

    This is so confusing!?! Why not just show all three items and use some conditional logic in the showWhen to make them visible?

    January 17, 2025

    Can you tell me how we can use in this way or else share a code snippet if possible

    stefanhelzle0001
    January 17, 2025

    All Appian UI components have the parameter "showWhen" that allows you to display it to the user based on conditions. I suggest to start with a small test to find out whether it fits your requirements.

    mathieud0001
    January 17, 2025

    I don't understand either.

    Did you take a look at this?

    docs.appian.com/.../breadcrumbs-pattern.html

    January 17, 2025

    thankyou for your response and suggestion, will go through this document