Forum Academy Marketplace Showcase Pricing Features

[SOLVED] Can you send data from reusable elements to a page?

If users click on the text elements in the side menu, they’re directed to that page. The information on the pages are different for each page, but the side menu is the same for all pages. I’ve used a reusable element for the side menu.

example:
The user creates a new thing (let’s call it a chair) and is automatically sent to “Name’s page”. There, chair title and rest of data is displayed correctly.
Content of Name’s page: chair
Main group content: chair
subgroup content: chair / data source: current page chair
Data that is sent from initial creation: result of step 1, create a new chair
Initial content of title etc. in name’s page: current page chair’s title

It also works fine if user goes to a page with a list of his/hers chairs in a repeating group and then clicks on a particular chair, and is redirected to the “Name & Description” page. The data populates correctly.

However, when user clicks the link “1 Name & Description” in the side menu, the data clears. Execution-wise, the user is sent to Name’s page again, but the data is not fetched/presented correctly.
workflow: go to page. data to send: current user’s chair
(with this one I anticipate there’s a mismatch of what’s sent and what is expected)

I tried to change from element text to element link, “2 Name & Description” to see if that changed anything. I anticipated it wouldn’t. I was correct.
data to send: current user’s chair
_(same problem as in case 1)

So I tried to put the “3 Name & Description” outside of the side menu. That worked.

So. How do you send data from a reusable element to a page? (And yes, I reviewed the “send data to pages” course but it “only” shows how to send from a repeating group to a page)

Ok, so I made some updates and changes. The setup is the same, some data fields are different. Pls see below.

example:
The user creates a new thing (let’s call it a chair) and is automatically sent to “Name’s page”. There, chair title and rest of data is displayed correctly.
Content of Name’s page: chair
Main group content: chair <-DELETED
subgroup content: chair / data source: current page chair <-DELETED
Data that is sent from initial creation: result of step 1, create a new chair
Initial content of title element etc. in name’s page: current page chair’s title

It also works fine if user goes to a page with a list of his/hers chairs in a repeating group and then clicks on a particular chair, and is redirected to the “Name & Description” page. The data populates correctly.

However, when user clicks the link “1 Name & Description” in the side menu, the data clears. Execution-wise, the user is sent to Name’s page again, but the data is not fetched/presented correctly.
workflow: go to page. data to send: current user’s chair <-CHANGED to current page’s chair
(with this one I anticipate there’s a mismatch of what’s sent and what is expected) now works

I tried to change from element text to element link, “2 Name & Description” to see if that changed anything. I anticipated it wouldn’t. I was correct.
data to send: current user’s chair <-CHANGED to current page’s chair, now works
_(same problem as in case 1)

So I tried to put the “3 Name & Description” outside of the side menu. That worked.

So that’s all good. HOWEVER, when you navigate away from Name’s page to e.g. images page and back again, data is lost. At that point it doesn’t matter what link you click. 1, 2, 3. None works.

What am I missing going through that menu?

Hi @jonaspalmqvist :slight_smile: can you provide a link to the editor?

Hey @fayewatson. Big thanks for your offer to help. I managed to solve it finally.

At first I used elements inside a subgroup inside a main group, which made it much more complicated. Solvable but more complicated.

I changed to elements inside a main group. Top two examples worked already yesterday, so not much to talk about there. What I had forgotten was to define what data to send from the images page’s side menu. I noticed even though it’s a reusable element, they are different for every page. Sooo… now all solved :slight_smile:

I can add I used:
name page
type of content of page: chair
type of content of main group: chair / data source: current page chair
data source of side menu: parent group’s chair

image page
type of content of page: chair
type of content of main group: chair / data source: current page chair
data source of side menu: parent group’s chair

you still want to have a look?

1 Like

Hi @jonaspalmqvist! That’s awesome you solved it! I was thinking it may have something to do with data source because that can be tricky with the reusable elements! But I wasn’t entirely sure. That makes sense what you did and happy to hear you got it working! :slight_smile: