Hi Mark

> So the question is, is there any tiddler where I could put the HTML <base> 
> code and have it invoked when the TW is loaded? Manually hacking the source 
> code is a bit inconvenient.

Try creating a tiddler tagged $:/tags/RawMarkup containing the <base> tag.

> Changing <base> also changes the base of any relative external links. So you 
> would have to choose between getting _canonical_uri right or getting your 
> links right.

Yes indeed, it’s a bit of a blunt solution, but hopefully will allow you to 
some exploring.

> Ideally you would have multiple bases, and images using _canonical_uri would 
> switch bases depending on tags or other criteria.

Yes, one could imagine introducing a new _canonical_uri_base field that 
contains the name of a tiddler containing the base URI for interpreting the 
_canonical_uri field.

> The point of all this is to make it possible to use TW on different platforms 
> where resources (images, pdfs, etc.)  may have to reside in completely 
> different locations.

I agree it’s an important use case.

Best wishes

Jeremy

> 
> Thanks!
> Mark 
> 
> On Monday, April 25, 2016 at 12:45:18 AM UTC-7, Jeremy Ruston wrote:
> Hi Mark
> 
>> Is there a way to easily change the base path of  _canonical_uri ?
> 
> There’s no such capability at the moment, but it’s an interesting suggestion.
> 
> As a quick fix, you may be able to use the HTML <base> element:
> 
> https://developer.mozilla.org/en/docs/Web/HTML/Element/base 
> <https://developer.mozilla.org/en/docs/Web/HTML/Element/base>
> 
> Best wishes
> 
> Jeremy.
> 
> 
>> 
>> I tried something easy like this, but of course it didn't work:
>> 
>> {{$:/MAS/DefaultImagePath}}/2016/maps/map-satel-nwlr2-folo-stalewater.png
>> 
>> But maybe there's some other way to do this with macros or templates?
>> 
>> Thanks!
>> Mark
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "TiddlyWiki" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to tiddlywiki+...@ <>googlegroups.com <http://googlegroups.com/>.
>> To post to this group, send email to tiddl...@ <>googlegroups.com 
>> <http://googlegroups.com/>.
>> Visit this group at https://groups.google.com/group/tiddlywiki 
>> <https://groups.google.com/group/tiddlywiki>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/5de478b8-e4e8-40c8-87ad-82a34885075b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/tiddlywiki/5de478b8-e4e8-40c8-87ad-82a34885075b%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywiki 
> <https://groups.google.com/group/tiddlywiki>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/a13fdd3b-61b8-4638-ac5c-a0bea233059c%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/a13fdd3b-61b8-4638-ac5c-a0bea233059c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/A04903AC-6C45-4752-BD8A-1D0834B4FC7C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to