Best practices having text on a page which is editable in the runtime

1
How would you solve the following: Usecase We have a lot of pages with helptexts on it. We want this text to be editable in the runtime via an “Edit” button on the page itself which is available for the admin.   I cannot think of out of the box Mendix solution where I can be happy with. Of course i can add an entity which contains the texts and add a dataview on the page to load the right object with a microflow. In the microflow behind the dataview i can retrieve the right object with an ID (string or enum) and show that object. But this way I need a datasource microflow for every page with a hardcoded id in it. To make sure there is always an object i can make it a get or create.  I did also think of a way to build a widget that for example uses the pagename to retrieve the right object. But this will go wrong when one of the developers changes the page name…. Another option is to build a widget where i can enter a helptext id. The widget then needs to do a get or create on the helptext. This way we do not need any microflows but we still have some hardcoded id's. Any best practices for this? 
asked
1 answers
0

Since this is no common question, there is no best practice for this. 

As you aim to get the most lightweight version from the user’s perspective here is a wild idea:

  • add a textbox to the page and give it a general class like for instance ‘helptext’
  • add a nanoflow that checks if the currentuser is administrator. If not, do noting. If so, it finds the textbox, copies this to a second editable textbox and the administrator can modify and store her improved version of the text (in all used languages)
  • in the backend, somehow using the SDK these modified texts are read and they replace the text in the textelement. And the new version gets deployed.

Another option is to have a look at the AppstorApp “Help Text Viewer”.

answered