XF 2.2 Using the new assets system

Alternadiv

Well-known member
I made a new style with no parent style.

I added an asset key of graphics and a path of styles/sixlxvi.

Then I went to the logo style property and used it to upload a logo. It uploaded the logo to data/assets/logo/logo.png. I was confused so I tried to type %ASSET:graphics%/logo.png in the box, but that does nothing.

To use the new uploading system and have the files go to styles/sixlxvi, what do I need to do differently?
 
The ASSET system is really designed for style distribution. If you have no plans of distributing your style, it'll upload images such as logos to the data/assets folder and you should use that. When you export as an archive, it'll bundle up the files you upload.
 
The ASSET system is really designed for style distribution. If you have no plans of distributing your style, it'll upload images such as logos to the data/assets folder and you should use that. When you export as an archive, it'll bundle up the files you upload.
Makes sense, thanks.
 
The ASSET system is really designed for style distribution. If you have no plans of distributing your style, it'll upload images such as logos to the data/assets folder and you should use that.
While I would generally agree with that, if you have two or more styles installed without the asset locations defined, if the images are not uniquely named, e.g. style1_1_logo.png, style_2_logo.png, rather than just logo.png, they will overwrite each other as everything is saved to the same (logo) directory.

Edit: Actually, it's not possible without access to the server in order to create/move the assets to the defined location. That's going to cause issues with cloud installs for those who create their own styles in the ACP and don't rename the assets.
 
Last edited:
Top Bottom