FĐŠ
FĐŠ

Reputation: 19

How to map existing pages on navigation bar instead of groups

Home page

My home page is on your screen and as you see I have a collapsable navigation bar and navigation cards on the homepage. In my collapsable navigation bar, you can see that the menu part "Računi" has 2 subregions under it, while the 2 subregions are real working pages the element "RAČUNI" is just there to make it look good (doesn't lead to any page.

My problem is that when I click "RAČUNI" on the right navigation bar shown in the cards region it redirects me straight to the login screen of my workspace.

How do I fix this?

Upvotes: 0

Views: 420

Answers (1)

Littlefoot
Littlefoot

Reputation: 143053

I'd suggest you to create your own table which contains the whole menu. As cards region is - actually - a classic report, it is you who should create query which will do what you want.

Here's an example of such a table:

enter image description here

  • PAGE_ID represents page on which cards report is located; if you have two (or more) cards regions on different pages, you'd keep them all in the same table; page_id will distinguish them
  • CARD_ID - primary key
  • TARGET_PAGE - can be used in CARD_LINK so that Apex would know where to navigate once you click on the card
    • in your question, it is unclear what you actually want to do when you click on "Računi" card. I don't know what code you used, but - if you do as I suggest, it is completely under your control; maybe you'll have to "split" that card into two and have separate "Pregled računa" and "Ispis računa" cards. Or, maybe you'll create a new page which will then let you redirect to one of these; can't tell
  • the rest of columns is, I think, self-explanatory

Example of a report query:

  SELECT page_id,
         card_id,
         card_title,
         card_subtitle,
         card_text,
         card_subtext,
         -- UI and other attributes
         NULL AS card_modifiers,
         --
         REPLACE (
            REPLACE (REPLACE (card_link, '<<PAR_SESSION>>', :APP_SESSION),
                     'P116_YYYYMM',
                     :P116_YYYYMM),
            'P116_ID_ORG',
            :P116_ID_ORG) card_link,
         --
         card_color,
         card_icon,
         --
         NVL (card_initials, apex_string.get_initials (card_title)) card_initials
    FROM cards
   WHERE page_id = 116
ORDER BY page_id, card_id;

That's it; basically, create your own query and fix CARD_LINK so that it does what you want.

Upvotes: 1

Related Questions