Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
services:pvw:conf:blocks [2015/03/17 17:27]
eric [Preset Blocks]
services:pvw:conf:blocks [2015/03/17 17:32]
eric [Custom Blocks]
Line 31: Line 31:
  
 ===== Custom Blocks ===== ===== 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 :+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 :
 <code php>​$pvw_conf['​blocks'​]['​NAME'​]['​content'​]='​YOUR_HTML';</​code>​ <code php>​$pvw_conf['​blocks'​]['​NAME'​]['​content'​]='​YOUR_HTML';</​code>​
-Where you have to replace: +Where you'll need 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) +  * **NAME** by the name of the custom block, starting with '​custom'​. Example ​:"//​custom//",​ "//​custom1//",​ "//​custom_desc//"​ etc. Note that this name is used in the CSS ID name and therefore ​should only include letters, digits, underscores ​or hyphens. (Never use spaces in the name) 
-  * **YOUR_HTML** is the place to put your own HTML code.  ​+  * **YOUR_HTML** is the right place to insert ​your own HTML code.  ​
  
 Example: Example:
Line 45: Line 45:
 </​code>​ </​code>​
  
-Beware that like in most languages, quotes or double quotes must be escaped ​in 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, 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. ​