Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Exporting from Tinderbox >> Gettting rid of %20
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1201882511

Message started by Ryan Ware on Feb 1st, 2008, 11:15am

Title: Gettting rid of %20
Post by Ryan Ware on Feb 1st, 2008, 11:15am

I've been playing around with Tinderbox exporting to html.  I've used Flint and one of the blog templates from the download section.

The urls end up being the titles of your posts which is fine except for the fact that they are littered with spaces which then become %20 in the url.  Is there a way to have the export replace spaces in titles of the posts with hyphens, underscores, or simply run the words together?

Thanks,

Ryan

Title: Re: Gettting rid of %20
Post by Mark Bernstein on Feb 1st, 2008, 3:30pm

See the attribute HTMLExportFileName.

(But, normally, Tinderbox synthesizes the export file name by omitting spaces.  So something special is happening here!)

Title: Re: Gettting rid of %20
Post by Ryan Ware on Feb 2nd, 2008, 2:35am

It happens with Flint and sample blog tinderbox files downloaded from your site.

Here is a sample url
file:///Users/ryan/Documents/TBoxData/myflinttest/mygreatestflinteffort%20files/index.html

When you say "See the attribute HTMLExportFileName"  Do you set that at the parent level?  In the case of flint would you set it in Archives|Year|Month and then any posts (children) of month would then get that attribute?

Title: Re: Gettting rid of %20
Post by Mark Bernstein on Feb 2nd, 2008, 1:51pm

The value of an attribute used in export is the value of the note -- often inherited from the prototype.  The note's parent is usually irrelevant.

With respect to the question, I just took a fresh copy of Flint and made a weblog with Tinderbox 4.1 .  I added an archive folder for 2008, and one for February, and made a new note inside it called "Testing Flint".  The exported file name is "TestingFlint.html" -- the space was omitted, as expected.

Title: Re: Gettting rid of %20
Post by Ryan Ware on Feb 2nd, 2008, 4:26pm

I'm seeing that behavior now in Flint.  Thanks

Is there a way to change the case to be all lower case in file names or add a hyphen between words?

Title: Re: Gettting rid of %20
Post by Mark Bernstein on Feb 2nd, 2008, 5:00pm

> Is there a way to change the case to be all lower case in file names or add a hyphen between words?


See the attribute HTMLFileNameLowerCase.

You can set the file name to whatever you like by setting HTMLExportFileName

Title: Re: Gettting rid of %20
Post by Ryan Ware on Feb 3rd, 2008, 3:19am

Thanks for the great help Mark.  Tinderbox is slick.  I've almost got my Flint based site the way I want it.  I have almost all urls lower case.  

The one thing I can't figure out is the "About" and "Contact" pages. They are based off the infoPage prototype, which I've set the HtmlFileNameLowerCase to be true and I've checked that manually in the Contact page itself and it is set to lower case there.  The file is output with a lower case name.  The problem is the main page top nav area still has the link as an an upper case "A" on about so if you click the About tab, it will 404.



Title: Re: Gettting rid of %20
Post by Mark Bernstein on Feb 3rd, 2008, 11:01am

Text Links will automatically be updated to match the name of the exported file, but Web links won't; they might well be referring to pages on a different site!  I suspect the nav bar is implemented with Web links like

    URL: /About.html

look at the note that contains the navbar -- I believe it's ^included and lives in the boilerplate section -- and Browse Links to see how the links are directed.  If URLs need to be updated, just edit them and press Update.

Title: Re: Gettting rid of %20
Post by Ryan Ware on Feb 3rd, 2008, 2:14pm

Thanks.  That worked.  Nothing about this is difficult, there are just lots of rocks to turn over until you figure out what is stored where and what is inherited from what.

Hopefully I'll be able to answer some questions here once in awhile too. :)

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.