Welcome, Guest. Please Login
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
Pages: 1
Send Topic Print
Tip: correct feeds with no base URL set (Read 3434 times)
Mark Anderson
YaBB Administrator

User - not staff!

Posts: 5689
Southsea, UK
Tip: correct feeds with no base URL set
Feb 14th, 2008, 9:02am
I fixed something today for aTbRef that might help others using TB to create static HTML page output (as opposed to blogs, etc.) along with RSS/Atom feeds to report occasional updates. The problem is providing web sites that use relative links whilst having valid links within the feed content. This relates to ^host^ and preferences.

In my aTbRef.tbx I don't fill out the doc-level HTML Preference for the web server URL as otherwise all the output HTML pages have absolute links - which is a problem for those users wanting to run their own local copies of the HTML (e.g. on their own Mac). What I didn't spot until today is that doing this breaks the links in the RSS as  - in NetNewsWire anyway - all links are based off the feed's full URL. Broken links.

How to ride both horses? I happily found that if I replaced ^host^ with "http://www.acrobatfaq.com/tbx/" in the feed & feed item templates (only) then the links work in the feed and all is well. Cleverly, the newsreader also prefixes the correct root URL to the item content's  inline relative links. Nice!

FWIW, I do use absolute links to the images as I don't want to put c.8MB of images files in the ZIP I offer of the TBX+ templates, though this is a different issue to that above. (Soon, hopefully, the templates will be in the TBX).

This likely doesn't affect many folk but for those who may be wanting relative links - except in their feeds - here's an answer. I hope that helps...
Back to top

Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print