I have a include template where I have a nested control and the child control is a function that takes in a parameter.
I need to pass in a parameter via a variable in the parent control, but I can not get this to work.
Here's a stripped down example of what I've done so far:
<% if GetProductSubPageOverview %> <% control GetProductSubPageOverview %> <div id="$URLSegment" class="tabPage typography"> <div style="position:relative; width:242px; height:181px;" id="overviewImgs"> <p>$PictureURL</p> <% control Top.getImagesFrom(Top.PictureURL) %> <p>$Parent.PictureURL</p> <img style="display:none;" src="$URL" alt="" width="930" height="200"/ > <% end_control %> </div> $Content </div> <% end_control %> <% end_if %>
Now, I've been google searching and I found out about the $Top and $Parent variables and that's how I got as far as getting the Top.getImagesFrom function to run in the nested control (if I pass in a simple string it all works). However, if I put in the 'Top.PictureURL" you see in the code, nothing is passed to the function. Note the "<p>$PictureURL</p>" does return the right variable, so I know I'm getting my right value until I get to the control. I've tried accessing the variable inside the nested control by the "<p>$Parent.PictureURL</p>" portion of code, but this also doesn't give me any value.
Can anyone tell me how I can access these variables?