Add Images in Extension pages

hello

I have create the extension in mailwizz and also i have created the pages in my extension but i want to add images to my page.

Any body can help me with this.
Thanks
 

twisted1919

Administrator
Staff member
You'll have to give us more details to understand what you actually need. What do you mean with "Add images" ? Add them where?
 

twisted1919

Administrator
Staff member
You need to copy the assets of your extension in a public location, in /assets/files/some-folder for example.
Use CFileHelper::copyDirectory($src, $dst, array('newDirMode' => 0777)); to copy a folder from a location to another.
Once copied to your new location, just reference the assets with:
Code:
echo Yii::app()->apps->getAppUrl('frontend', 'assets/files/some-folder', false, true) . '/images/something.png';
 
Top