Carry out the following steps:
Last but not least, we have to make sure the data we save in the block gets printed on the page. For this, we have to create a file named
view.php
.We've got to access and print the file object along with some basic commands to print the value of our variables. The content of the file has to look like this:
The last part, the actual rendering of the content, is rather short. We did use another helper, html
, to print our image element. We could have built this string manually, but which option you choose is up to you. We also used getPicture
again to get a file object from the controller. Besides these two commands...