Question about Virtual Domain extension


#1

I was excited to see the Virtual Domain extension working again
(version 1.2.1), but when using Radiant CMS with multiple domains it
renders the tag <r:breadcrumbs /> pretty useless, since it will
always display the Root page in the crumb.

Any way to have <r:breadcrumbs /> skip the Root page? Or anyway at
all to offset the crumbs?

Thanks, WKR> Thijs J.


#2

Radiant mailing list
Post: removed_email_address@domain.invalid
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant


#3

Hi,

I made a patch. This works fine in my environment.

diff -urN -x .svn -x ‘*~’
virtual_domain-1.2.1.orig/lib/virtual_domain_tags.rb
virtual_domain/lib/virtual_domain_tags.rb
— virtual_domain-1.2.1.orig/lib/virtual_domain_tags.rb 1970-01-01
09:00:00.000000000 +0900
+++ virtual_domain/lib/virtual_domain_tags.rb 2007-04-23
22:38:50.000000000 +0900
@@ -0,0 +1,16 @@
+module VirtualDomainTags
+

  • include Radiant::Taggable
  • def self.breadcrumbs
  • Proc.new do |tag|
  •  page = tag.locals.page
    
  •  breadcrumbs = [page.breadcrumb]
    
  •  page.ancestors[0..-2].each do |ancestor|
    
  •    breadcrumbs.unshift %{<a
    

href="#{ancestor.url}">#{ancestor.breadcrumb}}

  •  end
    
  •  separator = tag.attr['separator'] || ' &gt; '
    
  •  breadcrumbs.join(separator)
    
  • end
  • end
    +end
    diff -urN -x .svn -x ‘*~’
    virtual_domain-1.2.1.orig/virtual_domain_extension.rb
    virtual_domain/virtual_domain_extension.rb
    — virtual_domain-1.2.1.orig/virtual_domain_extension.rb 2007-04-23
    22:38:06.000000000 +0900
    +++ virtual_domain/virtual_domain_extension.rb 2007-04-23
    22:38:50.000000000 +0900
    @@ -14,11 +14,15 @@
    SiteController.send :remove_method, :show_page
    SiteController.send :remove_method, :show_uncached_page
    SiteController.send :include, CacheByDomain
  • StandardTags.send :alias_method, :tag_breadcrumbs_orig,
    :‘tag:breadcrumbs’
  • StandardTags.send :remove_method, :‘tag:breadcrumbs’
  • Page.send :define_method, :‘tag:breadcrumbs’,
    VirtualDomainTags.breadcrumbs
    VirtualDomainPage
    end

def deactivate
SiteController.send :alias_method, :show_page, :show_page_orig
SiteController.send :alias_method, :show_uncached_page,
:show_uncached_page_orig

  • StandardTags.send :alias_method, :‘tag:breadcrumbs’,
    :tag_breadcrumbs_orig
    end
    end

Keita Y.

2007/4/22, Thijs J. removed_email_address@domain.invalid: