Thanks a lot Eric!  That gave me "html" but I know just enough js that
I was quickly able to fix it.

var filename=parts[parts.length-1].split('.')[1];
Should be:
var filename=parts[parts.length-1].split('.')[0];

This was a huge help!

Beav-



On Sep 28, 12:52 pm, Eric Shulman <[email protected]> wrote:
> > How can I get my SiteTitle to include the filename of the TiddlyWiki?
> > For example my TiddlyWiki is named "05434.html" so I want my SiteTitle
> > to dynamically say "Job Notes for 05434".  I want to create a template
> > that a user can copy, rename the file according to job number then
> > when opened the SiteTitle is generated from the filename.
>
> The most straighfoward way to do this is to write a very tiny custom
> plugin that sets the *shadow* (default) SiteTitle content.  First,
> create a tiddler (e.g., "SetSiteTitlePlugin") containing:
> ----------------
> //{{{
> // GET FILENAME FROM URL (assumes ".../filename.ext")
> var parts=window.location.href.split('/');
> var filename=parts[parts.length-1].split('.')[1];
> // SET SHADOW SiteTitle CONTENT
> config.shadowTiddlers["SiteTitle"]="Job Notes for "+filename;
> //}}}
> ----------------
> Then, *delete* any 'real' SiteTitle tiddler that exists in the
> document (so the shadow content is used).
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
>
> ----
> TiddlyTools NEEDS your FINANCIAL support...
> HELP ME TO CONTINUE TO HELP YOU!
> Make a generous donation today:
>    http://www.TiddlyTools.com/#Donations
>
> Professional TiddlyWiki Consulting Services...
> ANALYSIS, DESIGN, and CUSTOM SOLUTIONS:
>    http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to