First, put your image (.svg) under : powertoolsstore\resources\powertoolsstore\import\sampledata\contentCatalogs\powertoolsContentCatalog\images\theme\
.
Then, next create a Media
with the code my_default_logo.svg
using this impex
:
## in : cms-content.impex
$contentCatalog=powertoolsContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
$media=media(code, $contentCV);
$siteResource=jar:de.hybris.platform.powertoolsstore.constants.PowertoolsStoreConstants&/powertoolsstore/import/sampledata/contentCatalogs/$contentCatalog
INSERT_UPDATE Media;$contentCV[unique=true];code[unique=true];realfilename;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator];mime[default='image/jpeg'];altText;folder(qualifier)[default='images']
; ;my_default_logo.svg ;default_logo.svg ;$siteResource/images/theme/default_logo.svg ;image/png; ;
Note : that this variable $siteResource
refers to powertoolsstore\resources\powertoolsstore\import\sampledata\contentCatalogs\powertoolsContentCatalog\
.
- And finally attach the new created
Media
to the SiteLogoComponent
:
## in : cms-content_en.impex
$lang=en
$contentCatalog=powertoolsContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
$picture=media(code, $contentCV);
INSERT_UPDATE SimpleBannerComponent;$contentCV[unique=true];uid[unique=true];$picture[lang=$lang]
;;SiteLogoComponent; my_default_logo.svg
Note : that you need to update cms-content_fr.impex
and cms-content_de.impex
and all other languages too.
- You should run a Synchronization of the Powertools Content Catalog (from : Staged to Online) otherwise you wont be able to see the changes in the front.