Make sure you add it is a Custom template. if you just hack up the view.php file then that is bad form and leads to bad habits which will open up a whole mess of problems for you later on. This also allows you to use the block normally on other parts of the site.
With this code you can easily reference a Page Attribute as with something like this
I didn't test this with a page attribute so let me know if it works. You will of course to have added the Page Attribute in the Dashboard > Pages and Themes > Attributes section.
For use of page attributes I had to add global $c before getAttribute.
...
For those, like me, unaware of proper use of custom templates check this: http://www.concrete5.org/index.php?cID=2921...
Basically; for this to work, view.php file should also implement render of template:
This thread may help you.
http://www.concrete5.org/community/forums/customizing_c5/slideshow-...