How can I create a collapsible block from page content using .tpl file?
i'm pretty sure all the core js and css files should handle both the collapsing and styling of the fieldset. you could simply add the fieldset into your code. however, if it is not added in by default for some reason you can use the following addition to your function code.

drupal_add_js('misc/collapse.js');
drupal_add_js('misc/form.js')


Below should be an opened fieldset example.

&lt;div id='flickrgallery'&gt;
  &lt;div id='flickrgallery-description'&gt;
    &lt;?php print $description; ?&gt;
  &lt;/div&gt;
  &lt;div id='flickrgallery-albums'&gt;
    &lt;?php foreach ($albums as $key =&gt; $album) : ?&gt;
     &lt;fieldset class=" collapsible collapsed"&gt; 
     &lt;legend&gt;&lt;span class="fieldset-legend"&gt;More Info&lt;/span&gt;&lt;/legend&gt; 
      &lt;div class="fieldset-wrapper"&gt; 
       &lt;div class='flickr-wrap'&gt;
        &lt;div class='flickr-image-link'&gt;
         &lt;?php print $album['image_link']; ?&gt;
        &lt;/div&gt;
        &lt;div class='flickr-title-link'&gt;
         &lt;?php print $album['title_link'];  ?&gt;
        &lt;/div&gt;
        &lt;div class='flickr-total'&gt;
         &lt;?php print $album['total'] . t(' Pictures'); ?&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
   &lt;/fieldset&gt;
  &lt;?php endforeach; ?&gt;
 &lt;/div&gt;
&lt;/div&gt;


To have it closed simply add collapsed to your class like &lt;fieldset class="collapsible collapsed"&gt;