R:link and hosting multiple sites off a single radiant insta


After reading the suggestion at

I tried setting up just such a system. It largely works; however,
unsurprisingly the r:link tag is thoroughly confused. As radiant does
not know that apache is “rehoming” all of its tags, I get goofed up

If I am missing something and there is an easy way around this
problem, please let me know. If not one thing that is working for me
is this simple patch against r:link, allowing for a “base” option that
is removed from the front of the url.

Thanks for Radiant

Index: /Users/phurley/mental/radiant/app/models/standard_tags.rb

— /Users/phurley/mental/radiant/app/models/standard_tags.rb (revision
+++ /Users/phurley/mental/radiant/app/models/standard_tags.rb (working
@@ -340,10 +340,13 @@
tag ‘link’ do |tag|
options = tag.attr.dup
anchor = options[‘anchor’] ? “##{options.delete(‘anchor’)}” : ‘’

  • base = options[‘base’] ? options.delete(‘base’) : nil
    attributes = options.inject(’’) { |s, (k, v)| s <<
    %{#{k.downcase}="#{v}" } }.strip
    attributes = " #{attributes}" unless attributes.empty?
    text = tag.double? ? tag.expand : tag.render(‘title’)
  • %{<a href="#{tag.render(‘url’)}#{anchor}"#{attributes}>#{text}}
  • url = tag.render(‘url’)
  • url = url.sub(/^#{base}/,’’) if base
  • %{<a href="#{url}#{anchor}"#{attributes}">#{text}}

desc %{ <r:breadcrumbs [separator=“separator_string”] />