HTMLGenerator – display Silex sites in HTML 5

Posted by
|

This plugin allows you to generate an HTML version of your websites. This is perfect for mobiles or internet tablets. And this is lighter too.

If your visitor do not have Flash, he should be automatically redirected to the HTML version of your website. If he does not have Flash nor Javascript, a link is displayed to visit the HTML version of the website.

HTML 5 plugin for Silex

Abotu this plugin

After having installed and activated it, you can access the HTML version of your websites by accessing your website’s URL followed by &format=html For example, if you access your website at the URL : http://myserver/?/myPublication then you can access the HTML version of it at http://myserver/?/myPublication&format=html

Also note that deeplinks should be put directly after the publication’s name without any hash. For example, in if in Flash version you have the following URL:
> http://myserver/?/testsimple#/start/test

You can access the HTML version by going at
> http://myserver/?/testsimple/start/test&format=html

Installation

To install this plugin on a silex server, use the manager’s plugin installer – see the tutorial, or copy the plugin folder in the silex_server/plugins folder.

Activation

In the manager, go to « Manage », click on the publication on which the plugin should be activated, then click on « Plugins > Activate a plugin », and finally click on the plugin icon and then on « confirm ».

Then you can click on the plugin name which appeared in the list of activated plugins, and edit its parameters.

Parameters

The parameters :

  • Default format: values can be ‘html’ or ‘flash’. It is the format which will be displayed by default, i.e. if there is not a format given in the URL (the ‘&format=html’ or ‘&format=flash’ in the address).
  • CSS declaration: Enter here CSS declaration, e.g. « body{font-family: Verdana;} ». Only taken into account in HTML version of the site. Your CSS must be URL-encoded, you can use this tool to do it. It should look like this: body%7Bfont-family%3A%20Verdana%3B%7D

Source code of the plugin

Here is the source code of this plugin, which is written in haXe (php target): html5generator

News letter

Evénements Silex Labs sur Paris et sa région: Inscrivez vous à la Newsletter mensuelle

Silex Labs community Tweets

Facebook page