English > Feature Suggestions

Export templates: variable for filename chosen in filter dialog

(1/3) > >>

svenne:
A feature request for export template development (http://www.videodb.info/help/hlp_export.html)...

When developing export templates, in %OPTIONS% section there seems to be no way to access the filename that was chosen by the user in the "save as" dialog. It would be neat to have the filename without extension for additional processing:

As it is now, all static files (stylesheets, background images, etc.) may be copied to a subfolder (which can go by a name like "HTML-files" or whatever). The subfolder would be created along with the exported file. I'd like the name of this folder to depend on the name of the exported file. So what I want to do: If the user chooses "peter's database.html" as export filename, I'd like to copy all static files to a subfolder called "peter's database_files". Hence it would be obvious that both belong together. In addition to that, Windows would automatically link files and folders named that way and treat them as a pair:
http://paulelso.wordpress.com/2006/09/20/xp-folder-option-managing-pairs-of-web-pages-and-folders/

Maybe you can add a new variable for the %OPTIONS% section providing the users chosen filename without extension and perhaps, just in case, also a second one providing the full filename (or the extension alone)?

If %fname% would be the variable for the filename without extension, something like this shall work:

--- Code: ---filter="HTML Files|*.html;*.htm"
copyfile="template\style.css<->"%fname%_files\style.css"
imagepath="%fname%_files\images\"
--- End code ---

Would be really great.
And by the way, thanks a lot for all your efforts, of course!!

nostra:
Added to TODO list

svenne:
Great, I just saw that it made its way into the newest version of the export plugin!  :)

It works well with copyfile, but when used with recordfilename and imagepath no records or images are exported...  :'(
recordfilename="%fname%_files\movie%id%.html"
imagepath="%fname%_files\images\"

And I just didn't consider until now: I will need another thing to be able to use it properly...
I need to have access to %fname% outside the %OPTIONS%-part of the template, too. I need it for links to subpages and to be able to include the stylesheets, for example. Something like this:
<link rel="stylesheet" type="text/css" href="./{%value=fname}_files/css/main.css">

Would that be possible? Thanks in advance, of course!!

nostra:

--- Quote ---recordfilename="%fname%_files\movie%id%.html"
--- End quote ---

It is not support for recordfilename


--- Quote ---imagepath="%fname%_files\images\"

--- End quote ---

Should work actually, but I will recheck it


--- Quote ---And I just didn't consider until now: I will need another thing to be able to use it properly...
I need to have access to %fname% outside the %OPTIONS%-part of the template, too. I need it for links to subpages and to be able to include the stylesheets, for example. Something like this:
<link rel="stylesheet" type="text/css" href="./{%value=fname}_files/css/main.css">

Would that be possible? Thanks in advance, of course!!
--- End quote ---

No problem

svenne:
Ok, just checked it... it works fine with imagepath!! Sorry...
It didn't work if used with both imagepath and recordfilename, but the problem was solely the use in recordfilename...

I just saw you didn't add %fname% to recordfilename but recordtemplate. I can't imagine any use in recordtemplate, because the path in recordtemplate is the source path in the Plugins\Templates folder of PVD and that can never be dependend on the filename chosen in the "save as" dialogue. Am I wrong?
Would be great to have that in recordfilename to be able to store all exported files in the subfolder "%fname%_files".

Navigation

[0] Message Index

[#] Next page

Go to full version