HTMLExportFileName

Tinderbox Icon


Attribute Data Type:   string
Attribute Default Value:   (not set - empty string)
Atrribute Group:   HTML
Atrribute Purpose:   HTML exported file configuration
Attribute Inherited from Preferences?     No
Attribute Read-Only?   No

Sets a specific filename to be used for the note's exported HTML page. If left empty, Tinderbox automatically generates a filename based on the note's title. Note that a string set for this attribute should be the desired filename without its extension — i.e. 'index' not index.html'.

Automatic filenames strip unsafe (see below) characters from the note title and truncate the resulting string to the number of characters set in $HTMLFileNameMaxLength (where the default is 24). The case of characters in the exported name will be as per the note title except if $HTMLFileNameLowerCase is 'true'.

Default: (not set - empty string)

To avoid filename naming collisions, Tinderbox has to check if the intended export name already exists in the currently exported-to folder. If a duplicate name might arise, a suffix will be added. Simplistically, if file "abc.html" is already being exported to the current folder, another note that would export with that name will be exported as "abc_1.html" (and -@, _3, etc.).

Because the filename might change on export, Tinderbox doesn't return a value for eval($HTMLExportFileName); an exception is if this attribute already has an explicitly set value. The workaround is to use ^file()^ - noting that the latter returns both file name and extension rather than just the name portion.

As Windows-OS webservers support fewer characters in file paths/names that other OSs, the following characters are suppressed when generating filenames from $Name:

[space] / \ ? % * : | ' " < > . & + ( ) ! 

From v5.8.1, the hash (#) character is also omitted from filenames.

From v5.9.0, further manipulation is available via $HTMLExportFileNameSpacer.

From v5.10.2, $HTMLExportPath evaluates the likely exported filename and path.


Possible relevant notes (via "Similar Notes" feature):

Up: String Attributes

A Tinderbox Reference File : Attributes : Attribute Data Types : String Attributes : HTMLExportFileName

Quicklinks: Attributes | Action Codes | Export Codes | Designators | Date Formats | aTbRef Site Map

[Last updated: 16 May 2012, using v5.11.1]


Search:

Google search aTbRef for:  


Creative Commons Licence

aTbRef by Mark Anderson is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

[See aTbRef CC licence Attribution & Waiver info]

Made with Tinderbox