Author Topic: Sub Folders in HTML  (Read 3261 times)

Offline The_Toff

  • Newcomer
  • *
  • Posts: 33
    • View Profile
Sub Folders in HTML
« on: February 18, 2007, 03:11:39 AM »
I have PM 4.4.38 and want to know how I can create subfolders when I send images to my viewing folder.ie if I cover a Gymnastics tournament I want to create one folder for the overall event , then subfolders for each apparatus. How is this done with export HTML

Thanks Rob

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Sub Folders in HTML
« Reply #1 on: February 18, 2007, 07:32:09 AM »
Rob,

I have PM 4.4.38 and want to know how I can create subfolders when I send images to my viewing folder.ie if I cover a Gymnastics tournament I want to create one folder for the overall event , then subfolders for each apparatus. How is this done with export HTML

I think you must have version 4.3.8 since there is no version 4.4.38 of Photo Mechanic.

The HTML Export feature in version 4.3.8 only creates fairly flat web galleries.  You would have to create several galleries, one for each apparatus and then you would have to create an outer web page that ties them all together.  The outer web page would have to be created by you outside of Photo Mechanic since it has no facility to do what you want.

That said, I think you could sort of get it to work but you would still need to edit the HTML that the exporter generates.  You could copy a representative image of each apparatus to another folder, then export that set of images.  Then you could edit the index.html so that when the individual thumbs are clicked, they open up the other galleries.  But you would still need to manually layout the files/folders in a hierarchy and you would have to know how to use a text editor of some kind.  Here is the layout I would use:

Event/
  index.html
  styles.css
  thumb/
  image/
  Parallel_Bars/
    index.html
    styles.css
    thumb/
    image/
  Uneven_Bars/
    index.html
    styles.css
    thumb/
    image/
  more events...

Then you would edit the index.html found in the Event folder.  So instead of HTML that looks like this:
...
          <td id="cb_caption" align="center">
            <a href="image/page1.html"><img src="thumb/IMG_1.jpg" alt="Parallel_Bars.jpg" width="120" height="128"></a>
            <br>Parallel Bars<br><br>
          </td>
               
          <td id="cb_caption" align="center">
            <a href="image/page2.html"><img src="thumb/IMG_2.jpg" alt="Uneven_Bars.jpg" width="85" height="128"></a>
            <br>Uneven Bars<br><br>
          </td>
You would change the href="image/pageN.html" to href="Parallel_Bars/index.html" or href="Uneven_Bars/index.html"

That would do it, but it isn't really straightforward.  You're wanting to create a hierarchical gallery of galleries, and I know of no exporter that does that outright.  The issue is that one web gallery doesn't "know" about the existence of the other.  It's easy enough to create the individual event galleries but to create that outer gallery that ties them all together would require that the exporter keep track of other galleries that it had generated previously and manage the on disk layout of all of the folders.

Version 4.5 of Photo Mechanic has a custom template facility and provides a programming language where an exporter can really do anything it wants in generating the HTML, but even with all that capability it would be fairly involved to create templates to do what you want, and even then one would have to be a software engineer in order to write the template.

HTH,

-Kirk