Use this code to print the content of the actual folder in a page
%MEDIA?path== substr($dir, 6) ?>&sortby== $opt['sortby'] ?>&order== $opt['order'] ?>%