Questions about the folder "assets"

Hello,

I have some questions about the folder "assets"

  1. If I understand this folder is the cache of framework.

  2. For safety I would like to move the assets folder outside the root of my site.

Is it possible?

Thank you

Is not the cache, is folder in wich are published protected file.

The directory protected (and the directory of the framework) are not accessable, so all file that have to been send to the client (usually css or js file) have to been published.

Therefore, the asset folder must to be accessable to clients, so you cannot move out of the root of the site, it would not be public.

If you want to change the path of assets, there is this property that you can set in config main.




   'assetManager'=>array(

        'BasePath'=>'yourAssetFolder',

    )



Thank you,

I put the property in file /config/main.php

But it shows this error message

That is placed in components, not the config root

You need to add the asset manager in the ‘components’ array since CAssetManager is an Application Component.




	// application components

	'components'=>array(

		'assetManager'=>array(

			'basePath'=>'yourAssetFolder'

		),

	)