Trim text


Add JavaScript or CSS in Block class

 To add JavaScript or CSS files to the head section of the resulting HTML page, you can add something like this to the _prepareLayout function of a Block class:

As you can see, we can use the layout model to get the head block an use its functions to add files. This doesn’t work inside of […]

Get URL parameters

With the following function you can read out the parameters from the currently opened URL: