Using Buttons Pro with Other Blocks

Loading the styles

You might want to use Buttons Pro styles with other blocks such as the form block for instance.

Buttons Pro allows you to use its styles without installing a block.

Buttons Pro added a page's attribute labelled “Buttons Pro Stylesheet”. To use it:

  1. Go to your Sitemap
  2. Click on a page and select “Attributes” from the dropdown menu
  3. Click on the “Buttons Pro Stylesheet” attribute from the left-hand list to add it to the page
  4. You can check that it was added on the right-hand panel.
  5. The attribute SHOULD be checked by default but better to verify and check it if needed
  6. Click on the green “Save changes” button

Whenever you will load that page, Buttons Pro CSS file will be loaded and all styles available for you to use however you want.

If a Buttons Pro block is already installed on the page, you don't need to use the page attribute as all styles are already available on that page.

In any case, styles will be loaded intelligently and only one instance will load no matter what; so there'll be no problem.

Generating button code to insert anywhere

Buttons Pro includes a Code Generator for you to create your button and get code to copy and paste anywhere you want.

This is especially useful if you want to use buttons with other blocks. Forms can be made much more attactive with Buttons Pro for instance butany block can be enhanced that way.

It's very simple. Go to Buttons Pro Code Generator and design your button. A sample is included that updates in real time to show you what your button looks like.

Once satisfied with your button, click on the “View code” tab and your code will be generated automatically, already indented and ready to use.

The code comes in 2 flavours: HTML and PHP. Make sure to read the included help (question mark button)

All you have to do is decide which one best fits your scenario, copy the code, and paste it where you want it.

  • If you want the code to automatically load all necessary styles without you doing anything else, use the PHP code. Be aware however that the block's output will not be cached
  • If you want the button to be cached and the whole page with it, use the HTML code. To make it work though, you will have to use the “Buttons Pro Stylesheet” attribute as explained above in “Loading the styles”.

A template for the core Form block is included with a mini tutorial on how to use it.