PricingBlog

how to pop open some options

  • rscott-1204116539532517426

    Bishop

    2 years ago

    To pop these options inside Chapter 1 open, I guess on load, I would populate the inner list (by the R on the left) inside a div and hide the div
    When clicked, it shows the div.
    If anything in the div is shown, I would somehow scroll the inner big column to an anchor.

    Does that sound right?
    1204116539855343626-Screenshot_2024-02-05_at_11.26.53_AM.png
  • stockton_f-1204194219808522251

    Stockton

    2 years ago

    Yeah, that's pretty sound logic to me. Show/hide on the submenu and go to anchor when clicked. Tricky party might just be assigning the IDs for the anchor. Not sure how dynamic that will be in your app.
  • rscott-1205001258805497886

    Bishop

    2 years ago

    ah yes it comes from the database i think it'll work.
  • rscott-1205401783334207498

    Bishop

    2 years ago

    So here's my issue/question. I'm sure its doable, I dunno how.

    I need to create the key for this lookup, dynamically.

    I have 'item' as 'Avatar Alchemist' or 'Tone Master' - how do I put that in here as the key? I want to insert the key dynamically then repeat over the resulting list.
    1205401783174696990-Screenshot_2024-02-09_at_12.34.42_AM.png
  • lucasg-1205403895795290112

    Lucas G

    2 years ago

    I’d imagine you should be able to use the Get node for it unless I’m misunderstanding
  • lucasg-1205404173013614662

    Lucas G

    2 years ago

    Ideally though, the key is structured as “key: Tone Master” in the array
  • Makes things easier for you I think
  • rscott-1205404350315503646

    Bishop

    2 years ago

    I got it.

    I am pleased as punch.
    1205404350147469342-Screenshot_2024-02-09_at_12.45.59_AM.png
  • rscott-1205404625931472896

    Bishop

    2 years ago

    1205404625633808424-Screenshot_2024-02-09_at_12.47.31_AM.png
    👍1
  • lucasg-1205405311050059776

    Lucas G

    2 years ago

    Perfect
  • rscott-1205531569322856478

    Bishop

    2 years ago

    Where I'm now having a problem which I think you were alluding to, is how to trigger it to open. Obviously I can detect a click to the section but to tie each section to a variable is the trick.

    Can we have objects as page variables? I need an object that's got key of the section name and a bool of whether or not its open.

    {"sectionname":true,
    section2name:false}

    unless there's a way to create 'local' variables which would be really useful.
  • rscott-1205532801349451786

    Bishop

    2 years ago

    i might be able to just insert the field in xano.
    1205532801152196638-Screenshot_2024-02-09_at_9.16.36_AM.png
  • lucasg-1205532851655807027

    Lucas G

    2 years ago

    Make it a component
  • Then it'll have its own 'local' variables
  • lucasg-1205533202958254110

    Lucas G

    2 years ago

    Then on click, the component sends back its data
  • rscott-1205533759684870264

    Bishop

    2 years ago

    oh so dumb i was doing it the hard way
  • thanks
  • i think this was gonna work but your way is way better
    1205533854698446909-Screenshot_2024-02-09_at_9.21.00_AM.png
  • Thanks man you have no idea how great it is you are usually around to help
    👍1
    😁1
  • rscott-1205534678623330334

    Bishop

    2 years ago

    I'm thinking its just the div with the drop down that's in the component, right?
    1205534678438772776-Screenshot_2024-02-09_at_9.24.09_AM.png
  • lucasg-1205535155918217317

    Lucas G

    2 years ago

    Looks right
  • You then pass in the data to repeat over through an attribute and either events or contexts to send the data back
  • Since it's just the one level, an event is probably fine