Page 1 of 1

Improving HTML export options

Posted: Wed Sep 20, 2006 5:57 pm
by SuperMacGuy
My idea is to have the HTML export template options include a way to more accurately name the files output.

Currently, the index pages are saved as “index, page1, page2, etc”, and the images for movies are saved as “125,126, 127, etc”. These names have no relationship or bearing (that I can see) on any fields or data in the pedia.

I’d like for the pedias to have a totally unique field that can be used for output to html. Perhaps the UPC code or maybe just an arbitrary unique number generated by pedia (to be able to handle burned and unique content). Using this new serial value, I want to be able to create a really killer HTML export. I could directly link a combined index page to an individual item listing. For example, I’d like to build a name only listing of all the movies. Each movie name would be a link to a pop-up new window that is just the complete description of the film. Right now, there seems to be absolutely no way to make this, since the page names are “page1” and of course have no bearing to the content of the page. Of course I understand that not every html output would be appropriate for this output.

I’d like for the output options to have an additional option like “Use Serial Number for file naming” that can be used for the html page and the images’ naming.

Also, I feel that the current naming of pages is not consistent... having the first page as “index”, then subsequent pages as “page1, page2, etc.” is difficult to programmatically work with. I'd like to see "index, index1, index2. Though using my 'new' naming option will make that impossible. I think it would be OK to not have an "index.html" page as the first page; or, have a basic "index.html" page that redirects or points only to the 'real' first file page.

Perhaps I can take care of some of this with some Javascript, but I'm not too versed on that yet. So if there are ways around you might know, please forgive.

Chris

Posted: Thu Sep 21, 2006 3:09 am
by Nora
Hi Chris,

I think what you're trying to achieve is a lot like the
Alex.html template,
KuzDVDCovers and
ChiaroScuro templates. All these templates have a details page that is separate from the main page. Take a look at them as examples.

Because as you mentioned the naming of the movies is sequential what these templates do is two exports and link the results of the first export, a simple list or cover, to the second export with more details that is saved as "details" inside the first export folder. The tag for linking these is [Key:IncrementalNumber]. You can use this key in the first export to link to the details page like this:

<a href="details/page[Key:IncrementalNumber].html">More info about this movie...</a>

This is possible because the current naming of pages is consistent "page1, page2, etc", index.html is only a copy of of page1.html so that web servers know where to start.

That is the basic idea. If you would like to get fancier with your template you can then even hard code options into the template. For example you don't have to do two exports by hand you can tell the first template to do a second export automatically.

<meta name="details" content="MyDetails.html" />

This second export gets placed in a details folder. The longest operation
for the export is creating the images so tell one export not to export
images.

<meta name="image-export" content="no" />

In your case it sounds like the first export with just a list of the movies
would not need the images, so that is all you need. But if both exports use the images then have the template that does not export images reference the images from the previous export. <img src="../[key:CoverImageURL]"> this one would be for the details page as ".." would move the path outside of the details folder. The other way around would be <img src="details/[key:CoverImageURL]"> if the details where the one exporting the images.


Also for your details page you want one movie per page so use:

<meta name="PageSplit" content="1" />

If you want all movies on your index page you could do:

<meta name="PageSplit" content="99999" />

but it's best sometimes to leave that option up to the user as he exports
the images as that is not strictly necessary, unlike the details page that
has to be one movie per page otherwise the linking would be off.

I hope all that made sense. There is no need to be forgiven, this is what
the forum is for. If you have any questions don't hesitate to ask them. Also take a look at BlueSortedIndex template it achieves something similar but throw using the index, sort your collection by title before trying this export for the similar effect; I personally like genre or theatrical release sorted.

Posted: Thu Oct 19, 2006 2:54 am
by iBoy
I am absolutely no expert, but I have found my own way to make details pages that corresponds with several other collections on my web site.

I have given all my movies a unique ID number in the Collection ID field. They start with 1, 2, 3 and so on, and I consecutive give new movies a new ID.

I export my movies sorted by Collection ID, with one page per entry (I have made a separate Smart folder for this, named Details, so I can just export this list, and I don't have to remember to rename the destination folder each time I export). These becomes my details pages.

I can then export several collections (Smart folders), sorted in different ways, where the titles are linked to "../Details/page[Key:CollectionID].html". Because the Collection ID is a unique number, the links will always work, no matter how the collections are sorted.

Posted: Thu Oct 19, 2006 11:22 am
by Conor
That is a very useful tip, thanks. A lot of serious users have collection ID set. In the future we would like to expose the internal ID used by the programs for exactly this purpose. Also labelling the images with this internal ID. It would allow for smart updating of exported pages and more importantly images.