Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
services:pvw:conf:blocks [2015/03/17 17:48] r2d2 [Preset Blocks] |
services:pvw:conf:blocks [2015/03/19 11:30] (current) r2d2 |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Site Blocks ====== | ====== Site Blocks ====== | ||
| - | Blocks are pieces of HTML code that you can add to either : | + | Blocks are pieces of HTML code that can be added to either : |
| * The Home Page | * The Home Page | ||
| * The Footer section of each page | * The Footer section of each page | ||
| Line 9: | Line 9: | ||
| Where : | Where : | ||
| - | * **TYPE** Is the blocks type and can either be **home** or **foot** | + | * **TYPE** Is the type of blocks that can either be **home** or **foot** |
| - | * **BLOCK_NAME** Is the name of a preset block or a custom block | + | * **BLOCK_NAME** Is the name of a "preset" or a "custom" block |
| - | The blocks will then be displayed in the order they are listed in the array. Example : | + | The blocks will then be displayed in the order in which they are listed in the array. Example : |
| <code php> | <code php> | ||
| $pvw_conf['blocks_on']['home']=array('carousel','jumbo','custom1'); | $pvw_conf['blocks_on']['home']=array('carousel','jumbo','custom1'); | ||
| Line 21: | Line 21: | ||
| ===== Preset Blocks ===== | ===== Preset Blocks ===== | ||
| - | We have created a few blocks that allow you to quickly add popular features to your Home Page or Footer. Here is the list of the actually available blocks : | + | We have created a few blocks that allow you to quickly add popular features to your Home Page or Footer. Below is the list of the actually available blocks : |
| - | * **carousel** Displays a pretty carousel of you products. All options that can be changed are listed in your Private Area (see the [[site|Site configuration Basics]]) | + | * **carousel** Displays a pretty carousel of products. All options that can be changed are listed in your Private Area (see the [[site|Site configuration Basics]]) |
| * **jumbo** : Displays a full width Bootstrap "jumbotron" block, containing your SiteName and your Baseline. | * **jumbo** : Displays a full width Bootstrap "jumbotron" block, containing your SiteName and your Baseline. | ||
| - | * **jumbo2** : Same as "jumbo", but the block width is fitted inside a "container" DIV. | + | * **jumbo2** : Same as "jumbo", but the block width is inserted inside of a "container" DIV. |
| - | * **boxes** : Simple template to displays nice "[[boxes|boxes]]" speaded as columns. | + | * **boxes** : Simple template to displays nice "[[boxes|boxes]]" spreaded as columns. |
| * **custom** : Is used for custom HTML content. | * **custom** : Is used for custom HTML content. | ||
| Line 31: | Line 31: | ||
| ===== Custom Blocks ===== | ===== Custom Blocks ===== | ||
| - | Apart from preset blocks, custom blocks allow you to create HTML content that you can insert among preset blocks. You'll need to define each custom block like this : | + | Apart from preset blocks, custom blocks allow you to create HTML content that you can insert among preset blocks. You'll need to define each custom block as follow : |
| <code php>$pvw_conf['blocks']['NAME']['content']='YOUR_HTML';</code> | <code php>$pvw_conf['blocks']['NAME']['content']='YOUR_HTML';</code> | ||
| Where you'll need to replace : | Where you'll need to replace : | ||
| Line 45: | Line 45: | ||
| </code> | </code> | ||
| - | Warning ! Like most languages, quotes or double quotes must be escaped from php strings depending on the enclosing quote type. (See [[http://php.net/manual/en/language.types.string.php|php string]]. If you have many quotes to escape, using the [[http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc|heredoc]] syntax might be a smarter workaround. | + | Warning ! Like most languages, depending on the enclosing quote type, quotes or double quotes should be escaped from the php strings. (See [[http://php.net/manual/en/language.types.string.php|php string]]. If you have many quotes to escape, using the [[http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc|heredoc]] syntax might be a smarter workaround. |
| ===== Customizing a Preset Block ====== | ===== Customizing a Preset Block ====== | ||
| - | If you dont like the way a preset block is set, you can of course, use your own custom block, to rebuild it the way you want. You just have to: | + | If you dont like the way a preset block is set, you can use your own custom block to rebuild it at your convenience. You only need to: |
| - | * activate the preset block, ie the 'carousel'. | + | * Activate the preset block like the 'carousel'. |
| - | * copy its content from the generated HTML page source | + | * Copy its content from the generated HTML page source. |
| - | * paste it in a custom block, ie 'custom_carousel' | + | * Paste it in a custom block, like 'custom_carousel' |
| - | * change it the way you want | + | * Change it the way you want it to be. |
| - | * active this custom block and desactivate the preset you used as a start | + | * Activate your custom block and deactivate the preset one you used at start. |
| Line 60: | Line 60: | ||
| {{indexmenu_n>20}} | {{indexmenu_n>20}} | ||
| - | |||