Mendix Ignite: Long live native deep links

Mitchel Mol
|
October 25, 2023

Deep links to pages and microflows have always been a core component of web applications. Mendix, with its one-page approach, has always needed a little extra help. Not build into the platform natively until the page URL was introduced. Unfortunately, the first implementation of the native deep link option was somewhat limited.

This changed when Mendix 10 released a far more flexible page URL functionality starting in June 2023. More recently, microflows became accessible via a deep link in Mendix 10.3. This instantly caused me to ask if we could now do without the deep link modules from Mendix?

And the short answer is YES. Thanks to the option to both pass IDs and any other primitive attribute of the types Boolean, Decimal, Enumeration, Integer, Long, or String, it is now possible to retrieve objects for the page parameter context from a user-friendly URL. Or retrieve those same objects and/or pass microflow parameters of those types to a Microflow you want to deep link via a user-friendly URL.

You will still need to deal with a templated URL as every URL will have to start with /p/, which would be awesome if we could make this configurable, too, for a truly friendly URL experience. (@Danny Roest)

Page deep linking

To enable a deep link URL to your page, open the page and look for the URL section in the page properties.

Page properties pane URL property

Click on the three dots and start configuring your page URL. For each page parameter, you will be able to set a key attribute to retrieve that object during the opening of the page.

Editing the page URL

After you have configured the page URL, you will be able to open the page via the page URL. Remember that you may form your URL as you want, so the order of key values is not essential. But make sure the URL is friendly to read to a user if you want to communicate it. That helps with remembering the URL.

Page properties pane URL attribute with a value

Something else to remember is that the page called via URL will always open as a full page. So, even if it has a specified popup layout, this will be ignored if you want to open the page as a popup (maybe even on top of a different page). You may use the Microflow URL option.

Microflow deep linking

For Microflow deep linking, it is mostly the same as with pages. You open up the Microflow you want to deep link and go to the URL property in the properties pane.

Microflow properties pane URL attribute

From there, it is slightly different. As you could have both primitive and object parameters, you may map from the deep link URL. The objects work the same as for pages, and you can use information from your URL as a key to retrieve the object during the Microflow execution. Primitive parameters are directly mapped from the URL onto the parameters when the Microflow is executed. Lists are not supported.

Editing the Microflow URL

t is advisable to mainly use the primitive parameters for deep link Microflows as it allows additional validation on the URL data before retrieving an object or executing an action. Of course, if you try to map an invalid value on a primitive data type, it will still give a general error. For example, trying to map a string value on a decimal parameter.

After configuring, it will result in the following look in your properties pane:

Microflow properties pane URL attribute with a value

Conclusion

Starting with Mendix 10, you could replace the Deep link and REST deep link modules unless you want extra control over your URL. For everyone who is okay that your deep link URLs start with /p/, just as you have been okay with /link/. The new native options are fantastic. It makes it even easier for a public-facing application to start adding friendly URLs to all pages for easy deep linking by the end users of your application.

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Heading

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.