Do I have understood correctly that this function only works for .js, .html and .css files (so I can link these types of files within each other)?
But is there a possibility to link dynamically to other elements (e.g. SVG graphics) within .js and .css files?
The background of my question is that I am currently building a new website in a test portal and want to transfer it to our account afterwards. With this dynamic URL I would have one less source of error if I don't have to replace all URLs later.
Apologies for the delayed response. I'm happy to clarify.
Yes, the get_asset_url HubL function only works for HTML/HubL, CSS, and JS files.
No, you wouldn't be able to link other types of files with this function since it only works with assets uploaded to the Design Manager where only HTML/HubL, CSS, and JS files can reside.
If you uploaded the SVG files to your file manager, however, you could reference the file with the file_by_id function. See the sample here.
Apologies for the delayed response. I'm happy to clarify.
Yes, the get_asset_url HubL function only works for HTML/HubL, CSS, and JS files.
No, you wouldn't be able to link other types of files with this function since it only works with assets uploaded to the Design Manager where only HTML/HubL, CSS, and JS files can reside.
If you uploaded the SVG files to your file manager, however, you could reference the file with the file_by_id function. See the sample here.