How to keep the same URL with different pages?

Hi community,

My customer wants to have an application with around 50 different pages with one question per page and previous / next buttons.

The requirement is to not show to the user the real URL of each page, but keep the URL as it is on the first page.

Is that possible in OutSystems?

If not possible, my ideas:

1. The workaround here is to create one page calling 50 blocks which are displayed based on condition but this could be hard to maintain in terms of development.

2. Another way of seeing this but I don't like the idea is to include the questions in an iframe and generate a token to hide the ID of each question.

Any idea on this?

Thanks!


mvp_badge
MVP
Solution

Hi Jesse,


If each block has its own look and feel and need to be "coded" differently then you would need to have different screens or different blocks (to keep the same url).

Nonetheless, I find it odd that the 50 questions don't have a pattern or a small set of patterns.

What I would do:

1. Persist in the database the 50 questions, use a block to display a question given its id, and the previous / next button to iterate through them.

2. Identify the patterns among the 50 questions. You say they have a different "look and feel". Might it be just different CSS? In that case, i would persist on the database for each question, a CSS class and would set it as the CSS class of the root container of the block. In this way, you could have the specification of each CSS class in the theme but just a limited number of blocks to code.


Bottom line, there should be some patterns in the questions in order to make an abstract code that fits your use case (you may end up with 4 or 5 different blocks depending on the type, for instance, if the question is a multiple choice one or free text). Not knowing more it's hard to give you a more concrete solution but I think the point is clear.


Kind Regards,

João

Hi Jesse,

Reading your question and idea of using Webblocks, would that not be the answer to your problem? Use a webblock with an input parameter that holds the question number and filter the question aggregate on that number? On Next and Previous the input changes and the next or previous question would show.


Maybe this is too simple and not what you need, but just an idea. 


Max

Thanks Max!

I forgot to specify something: each question need to be a specific block because the look and feel of the question will be almost always different :/

Ah that makes it a bit more complicated indeed. I know that we once created a block that also had a Question Type Id and based on that different sorts of questions were shown (dropdown, text, radio etc). This was helpful since our question were uploaded by some end users in an excel file. Maybe something similar to this might work for you as well. 

Otherwise I would not know how to hide the URL of 50 different pages. 

mvp_badge
MVP
Solution

Hi Jesse,


If each block has its own look and feel and need to be "coded" differently then you would need to have different screens or different blocks (to keep the same url).

Nonetheless, I find it odd that the 50 questions don't have a pattern or a small set of patterns.

What I would do:

1. Persist in the database the 50 questions, use a block to display a question given its id, and the previous / next button to iterate through them.

2. Identify the patterns among the 50 questions. You say they have a different "look and feel". Might it be just different CSS? In that case, i would persist on the database for each question, a CSS class and would set it as the CSS class of the root container of the block. In this way, you could have the specification of each CSS class in the theme but just a limited number of blocks to code.


Bottom line, there should be some patterns in the questions in order to make an abstract code that fits your use case (you may end up with 4 or 5 different blocks depending on the type, for instance, if the question is a multiple choice one or free text). Not knowing more it's hard to give you a more concrete solution but I think the point is clear.


Kind Regards,

João

To be more precise it's to create a sales funnel so each page/block need to have one question and will display some images based on the question subject so we may have some patterns but not so many.

What I'm gonna do probably is create one page per question and control server side the access to the pages because if I do everything in the same page it will be very hard and heavy to manage.


Thanks for the answer!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.