Save Button with Static Collection

I am trying to add a save button to items in a collection list. Ideally, the collection would be static for SEO. Is there a good way to fetch an authenticated user’s saved items from Xano and change the icon on the static collection list item if they have already saved each item?

I have this working with Xano and a dynamic collection list. Would it be better to load the collection list dynamically first to include the user saved info, then link to the static collection page somehow?

Weweb Site Link:

Screenshot:

Hi @foliodc ,

I think the best way would be to have a dynamic collection called user's saved items or a userSavedItem property in your user profile.
Then what you can do:

  • Keep your static collection for your list
  • Add a conditional display on you “+” button, like this :point_down:

user's saved items should be an array of ids, something like this: [2,3,51]

item.data['id'] is the id of current item

  • Then, you can add a text like “item saved” with the opposite formula. “not” formula is extremely useful for this.

  • You should have something like this

  • Then, you add a workflow to you icon to update the collection or the user profile, depending on where you put the array of saved items.

Tell us is that worked for you!

1 Like