How to :: use dynamic assets url

Important

For now, it’s only available for Home Logo and Menu Logo assets.

Intro

That feature allows you to change dynamically the assets used in order to go deeper in customization for the same app, mainly when you’re targeting several clients with the same small app.

You can add the assetsUrls at the root of your front_config file and then describe URLs for menuHeaderLogo and homeHeaderLogo as following.

With static urls

assetsUrls:
  menuHeaderLogo: "https://cdn.com/imageA"
  homeHeaderLogo: "https://cdn.com/imageB"

With templated values

What’s interesting to do, is to template those values according to your report value that is often dedicated to a group of users.

report menuLogo homeLogo
Client A https://acm e.com/asset s/clientA/m ainlogo.png https://acm e.com/asset s/clientA/s econdlogo.p ng
Client B https://acm e.com/asset s/clientB/m ainlogo.png https://acm e.com/asset s/clientB/s econdlogo.p ng
Client C https://acm e.com/asset s/clientC/m ainlogo.png https://acm e.com/asset s/clientC/s econdlogo.p ng

And then set:

assetsUrls:
  menuHeaderLogo: "<%= appRequesters.report.menuLogo %>"
  homeHeaderLogo: "<%= appRequesters.report.homeLogo %>"