English > Scripts and Templates
Export template: HTML List (English + German)
rick.ca:
--- Quote ---Something different: Within the template, in %OPTIONS%-area: is it possible to get the filename that was chosen by the user in the filter dialog, with and without extension? Something like %filename%?
--- End quote ---
Not that I'm aware of. I assumed there would be an HTML variable for getting the filename of a page, but maybe that's a bit strange. ::)
--- Quote ---I tried a different approach now to provide full control over the title apart from the filename...
--- End quote ---
Yes, that's a better idea.
svenne:
Nostra implemented some special values you can use within the rest of the template (outside of the %OPTIONS% part), documented here (if anyone wonders): http://www.videodb.info/help/hlp_export.html
There are
{%value="206"} - Path to the first page (HTML)
{%value="207"} - Path to the index file for the current record (HTML)
{%value="215"} - Path to the current record's file (HTML)
{%value="220"} - Path to the index file for the current record
just to name a few. And there are functions to extract a filename (without path) from these values or its extension, and in combination with StringReplace you can have the filename without its extension. So your suggestion to take the filename (without extension) as headline would not be that difficult to achieve.
But I was thinking of something else already: If the user decides to name the exported file "statlersmoviecollection.html" it would be nice to name the subdirectory containing all the accompanying files (like CSS stylesheets and poster images) "statlersmoviecollection_files" instead of "htmlprintfiles". Not only that the user would immediately see that both file and folder belong together, Windows also would recognize this and treat them as if they were glued together. For example, if you moved the html file to a different location, the subdirectory would automatically move too, etc.
rick.ca:
--- Quote ---So your suggestion to take the filename (without extension) as headline would not be that difficult to achieve.
--- End quote ---
I still like what you've done better, but I suppose it would be cool if the filename was used as the default heading. It would also go nicely with your idea of linking the subdirectory. If one does want to copy or move the files, that will obviously make them easy to identify, and that operation less error-prone.
svenne:
I made the database filename the default heading, so if you (in PVD) go to File->Save as and save your database as "Rick's Movies.PVD", all export templates I wrote would use "Rick's Movies" as default heading... bad idea?
--- Quote ---idea of linking the subdirectory
--- End quote ---
I will post a feature request, perhaps Nostra will find the time to add a variable handing over the filename from the "save"-dialog in the %OPTIONS% section.
rick.ca:
--- Quote ---all export templates I wrote would use "Rick's Movies" as default heading... bad idea?
--- End quote ---
I think it's a good idea—as long as you're retaining the editable "headline." In other words, it will default to the filename, but can still be changed in the browser.
--- Quote ---I will post a feature request, perhaps Nostra will find the time to add a variable handing over the filename from the "save"-dialog in the %OPTIONS% section.
--- End quote ---
OIC. I guess you can't use the filename after-the-fact to create the directory. :-\
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version