Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
Tinderbox Users >> Exporting from Tinderbox >> Exporting a site

Message started by Lew Friedland on Jan 16th, 2008, 2:07pm

Title: Exporting a site
Post by Lew Friedland on Jan 16th, 2008, 2:07pm

I am exporting a site, built with a modified version of Marisa Antonaya's template (which, by the way, is one answer to my earlier question about the simplest way to build a simple web site).

In HTML view, preview, all styles show up precisely as formatted. When I export to a file on my server, no styles are present. I have checked to make sure the CSS.styles sheet has been exported, and it has.  All other templates are there.

Any thoughts? Thanks.

Title: Re: Exporting a site
Post by Mark Anderson on Jan 16th, 2008, 3:13pm

It is most likely you've somehow got either:
  • absolute paths where you'd do better with relative** paths (i.e. the browsers looking in the wrong place for the style sheet
  • your edits to the original Antonaya model have made relative paths incorrect

** absolute lists the full "http://....." path whereas relative simply gives the local path from where the current page is (as in "up one level and then down folder/folder to file X").

Is there a public URL we could see? It would help to see the source code in context.  If we see that it will be easier to figure where the error crept in.

Title: Re: Exporting a site
Post by Lew Friedland on Jan 17th, 2008, 11:35am

Figured it out (with the help of a friend).  I had actually checked the URL carefully for paths and it was fine. The problem was that the group permissions on the CSS.styles sheet had somehow been set to "no access."  One of those things.

thanks, Mark.

Title: Re: Exporting a site
Post by Lew Friedland on Jan 17th, 2008, 11:37am

BTW, the public url is www.journalism.wisc.edu/~lfriedla/j561/
It's not done yet, but for any newbies who want to watch the creeping process of construction, be my guest.
Of course, suggestions welcome.

Title: Re: Exporting a site
Post by Mark Anderson on Jan 18th, 2008, 4:44pm

Thanks for the URL. Take heart, your fellow Tinderboxers are here to help.

A few HTML code glitches I've noticed (though they don't stop the page rendering):
  • You've no DOCTYPE at the top of your main template. This just makes it harder for browsers to figure out what your code means and (more importantly) almost ensures no two browsers will look the same. I suggest you add this to make it lines 1-2 of your template:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

  • Where you have (in the top of the page):
    <p><h4>...some TB code...</h4></p> make that <h4>...some TB code...</h4>
  • In the line following <!--This command includes the Menu note from the Tinderbox file, using the textOnly.html template as formatting --> this
    <p><strong>TB code for (?) note name</p> should be <p><strong>TB code for (?) note name</strong></p>. You finish 'strong' after the link list.  If you want those in bold, put <strong></strong> around the code that emits each link item - look the relevant export code syntax code up on aTbRef. Thus instead of, for example, ^basicLinks( <ul>, <li>, </li>,</ul> )^ you'd use ^basicLinks( <ul>, <li><strong>, </strong></li>,</ul> )^
  • Inside the head of your HTML template (between <head> and </head>) include a title - something like <title>^get(Name)^</title>.
  • In the place that makes the link in the main content e.g. the "Purpose of Course" link, check the HTML. Where you make the link the href="" bit has glitch as you've left a space at the beginning of the url. The equivalent of <a href=" ^get(attribute)^"> instead of <a href="^get(attribute)^">
  • On pages like http://www.journalism.wisc.edu/~lfriedla/j561/weekfivetherise.html the text is awry becasue of the style sheet settings - use shorter left column titles or change the CSS.

The good news is none of the above (apart from perhaps the last) needs doing urgently.  But, if you're acquiring new (coding) jhabits, they might as well be good ones.

Hope this helps!  :)

Title: Re: Exporting a site
Post by Patrick Lynch on Sep 30th, 2008, 2:47am

I am getting a weird response when I export out of Antonaya site. When I customize and export the pages according to instructions, I get no left Menu nor a Right Sidebar, just the TB text like this: ^include(Menu,textOnly.html)::.
Any thoughts?

Title: Re: Exporting a site
Post by Mark Anderson on Sep 30th, 2008, 3:47am

Did your copy of the source TBX export correctly before customisation?  What customisations, specifically, have you made? Try rolling back your customisations one by one (or start over, exporting after each change to see what broke the export.

Title: Re: Exporting a site
Post by Patrick Lynch on Sep 30th, 2008, 10:13pm

Did so, but it still remains problematic. All I did was change the section names.
Thanks, Mark
P.S. All was good before last two updates? Any relationship?

Title: Re: Exporting a site
Post by Mark Anderson on Oct 1st, 2008, 4:23am

OK, I found a copy of this TBX on my system and gave it a try, getting the same as you with the side columns showing just export code followed by a double colon.  The latter made me think some sort of export template issue was at play.  To be on the safe side, I downloaded a fresh copy and expanded it.  My first action was to set the Doc-level HTML Preference to use the page.html for the site's templates folder as the TBX's default HTML template.  This seemed to allow the the prototypes to fins their allocated templates; I assume they look in the folder holding the default template.

In my first test, I'd manually set the prototypes' template to the right type but not - if I recall - a doc level template (as one wasn't needed (or so I thought!).

So, I have seen the error you describe and attribute it to incorrect initialisation of the HTML templates. In my successful test, I downloaded the DMG unpacked it and the only actions I took were:
  • Open the TBXs doc HTML preferences and choose the site's page.html as the default.
  • Set the folder location for export. You must use the site's own folder as the CSS isn't exported from the TBX.
IMO, the TBXs start-up instructions are insufficiently clear about setting the doc's template (folder) before export.  Personally, for use, I'd migrate the templates into the TBX itself to make the TBX less prone to breakage if moved. I'd also make the CSS an exported page removing outside dependencies.

I also noticed that if you changed the name of the Section notes, the left sidebar didn't update.  This is because the 'Menu' note list the section note names as text with links to the section notes - so updating the section name updates the link but not the anchor text in 'Menu'.  Better would be to make 'Menu' a container and add - in this order - an alias of 'Home' followed by all the existing section notes. Then get 'Menu' to export ^childLinks via the appropriate template.

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.