on 2024 Feb 08 2:19 AM
Hi everyone,
We are currently using SAP Commerce On-Prem 2205.13 and there is a requirement to modify one of the pages with some dynamic content, more specifically adding a download URL that could be maintained by the end user in the Back-Office.
The page in question is being delivered via ImpEx script which updates the CMSParagraphComponent setting the HTML as a static string in the content[lang = en] column. My first idea was to concatenate the "static" string with a dynamic property, but I haven't found a way do so... Is even possible to reference a dynamic property inside of an ImpEx script?
Another idea was to use directly a media file URL, but same situation, can I reference the media object inside the ImpEX script?
Since I'm fairly new with this content changes for Hybris, does anyone have a suggestion or a better solution?
Thanks!
Request clarification before answering.
Hi @frnk83
Not knowing the full requirements, I'll give some general recommendations.
If the requirement is to have an explicit download URL (triggers a download from a browser), I'd recommend creating a new CMS Component that can handle this. The new CMS Component type can contain a reference to a MediaModel. Depending on your front-end approach, you may need additional Controllers/Renders/JSP (if using Storefront) or updated Angular components (if using Composable Storefront/Spartacus)
For examples of how to reference a MediaModel in ImpEx, reference "powertoolsstore", "apparelstore", and "electronicsstore" as a good way to see how to pull in images and/or media via ImpEx.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @adamreisberg,
Thank you for your quick response, I'll check your suggestions to see how they fit to my requirements.
Regards,
User | Count |
---|---|
11 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.