Media folder name to node id

Hello, I'm using umbraco 7.1.4, trying to follow this example and I am stuck with something.

I want to pick a media folder and then list all images in that folder. In this version of Umbraco the only solution to me seems to have a macro with a Textbox parameter (alias albumFolder).

I then want to use this parameter like this: 

<xsl:variable name="images" select="$currentPage/albumFolder"/>

But I cannot get this to work. There is no reference in the whole xml doc currentPage to this folder. What am I doing wrong?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/54105-media-folder-name-to-node-id