#DotEnv
Since version 3.1.0, PrettyBlocks has introduced DotEnv
for developers to have more flexibility with PrettyBlocks. To use it, simply place a .env
file in the root folder of PrettyBlocks.
#ViteJS
You can configure VITEJS
to modify the VueJS interface of PrettyBlocks.
#Options
PRETTYBLOCKS_VITE_DEV
defaults to false
and allows you to specify if you want to use ViteJS's HMR
(Hot Module Reloading). To use this parameter, you need to run npm run dev
in the _dev
folder.
PRETTYBLOCKS_VITE_HOST
defaults to 'http://localhost:3002/'
and allows you to modify the ViteJS URL.
#Iframe
You can now modify the Sandbox options. Depending on certain browsers and local environments, this may be required. The default value is:
1PRETTYBLOCKS_IFRAME_SANDBOX='allow-same-origin allow-scripts allow-forms allow-popups allow-presentation'
You can simply add whatever options you deem necessary.
#CORS
PRETTYBLOCKS_CUSTOM_HEADERS
helps address certain CORS issues, particularly in local environments. Here's an example of usage:
- Product Description
- Product Short Description
- Category Description
- CMS Page Content
If any of these areas are empty, a block of type CMS Content, Product Description (short or long), or Category Description will be automatically inserted.
To disable this, you can set the following options to true
:
1DISABLE_AUTO_FEED_ZONE_PRODUCT_DESCRIPTION=true2DISABLE_AUTO_FEED_ZONE_PRODUCT_DESCRIPTION_SHORT=true3DISABLE_AUTO_FEED_ZONE_CATEGORY_DESCRIPTION=true4DISABLE_AUTO_FEED_ZONE_CMS_CONTENT=true
#Remove Ads
If you wish, you can remove the ads we display.
Either by using DotEnv
PRETTYBLOCKS_REMOVE_ADS=false
or via PHP Configuration::updateValue('PRETTYBLOCKS_REMOVE_ADS', true)