This is an old revision of the document!


Site Blocks

Blocks are some pieces of HTML code that you can add to either :

  • the Home Page
  • the Footer section of each page

They are all OFF by default, and should be activated using the following syntax :

$pvw_conf['blocks_on']['TYPE']=array('BLOCK_NAME','BLOCK_NAME2');

Where :

  • TYPE is the blocks type, either home or foot
  • BLOCK_NAME is the name of a preset block or a custom block

The blocks will then be displayed in the order they are listed in the array. Example:

$pvw_conf['blocks_on']['home']=array('carousel','jumbo','custom1');
$pvw_conf['blocks_on']['foot']=array('boxes','custom2');

Preset Blocks

We have create some blocks that allow you to quickly add some popular features on your Home Page or Footer. Here is the list :

  • carousel Display a pretty carousel of you products. All options that can be changed are listed from your Private Area (see the Site Global configuration
  • jumbo : displays a full width Bootstrap “jumbotron” block, conatining your SiteName and your baseline.
  • jumbo2 : same as “jumbo”, but the block width is fitted inside a “container” DIV.
  • boxes : simple template to displays some “boxes'” speaded as columns.
  • custom : for custom HTML content

Custom Blocks

Apart from presets block, custom blocks allow you to create HTML content that you can insert among preset blocks. You have to define each custom block like that :

$pvw_conf['blocks']['NAME']='YOUR_HTML';

Where you have to replace:

  • NAME by the name of the custom block, starting with 'custom', ie:“custom”, “custom1”, “custom_desc” etc. Beware that this name is used in the CSS ID name and thus should only include letters, digits underscore or hyphen. (Don't put spaces in the name)
  • YOUR_HTML is the place to put your own HTML code.

Example:

$pvw_conf['blocks']['custom_news']='
<div class="container">
  <H2>Analoger Just Released!<H2>
  <a href="/products/p226-Analoger"><img src="/static/domain_name/img/analoger.jpg"></a>
</div>';

Beware that like in most languages, quotes or double quotes must be escaped in php strings depending on enclosing quote types. (See php string. If you have many quote to escape, using the heredoc syntax might be a smarter workaroud.