How to use YouTube Player widget in 2.0.8
From TomatoCMS Documentation
Install widget
In the back-end section, goto System > Extend > Widget, click on the utility from the list of modules, and click on the Install button in the YouTube Player widget section.
Configure the widget
For example, I assume that you want to show the widget at the home page, you can use one of two methods:
- The first one: use the Layout Editor
In the back-end section, go to System > Template, click on the link List of pages associating with the current template.
Next, click on the Edit the Layout link associating with the Homepage.
Click on the Widget tab, click on the utility module, and drag and drop youtube player widget to the container you want to show it on the front-end.
Put the Youtube clip information which should be similar to what you see below:
- The second one: Insert the XML section directly to the layout file
Open the layout configuration file, core_index_index.xml located in the /application/templates/default/layouts directory.
Put the following code in certain container:
<widget module="utility" name="youtubeplayer" load="php"> <title><![CDATA[YouTube clip]]></title> <params> <param name="url"><value><![CDATA[http://www.youtube.com/watch?v=7sA0upGrg_I]]></value></param> <param name="title"><value><![CDATA[TomatoCMS Layout Editor]]></value></param> <param name="width"><value><![CDATA[300]]></value></param> <param name="height"><value><![CDATA[225]]></value></param> </params> </widget>
Of course, you can change the parameter values to your settings.
Update the style for widget
Put the following CSS code to the skin file (/skins/default/default/default.css)
.t_utility_youtubeplayer h2 { font-family: Tahoma, Arial, sans-serif; font-size: 13px; font-weight: bold; height: 30px; line-height: 30px; border-top: 2px solid #a3a3a3; border-bottom: 1px solid #e5e5e5; } .t_utility_youtubeplayer div { margin: 5px 0px; }
The result looks like:



