Add parameter in url when initializing application

I need a parameter to be added to all web site urls automatically, for example;

This parameter layout=45454578, must come from the database and be added automatically when you initialize the application.

Can anyone help?


For example; When the user accesses the site I pass the following link:, so I would be able to know which layout to use, but how do I keep this parameter layout=4545455 on all routes Site? Well if I click on the about menu it will be with the url

I like to handle my urls in UrlRules. Maybe this will help you:

In createUrl() you append the layout parameter for each url.