engines/adva_cms/lib/routing_filter/section_root.rb
# prepends the root section path to the path if the given pattern matches
prepends the root section path to the path if the given pattern matches
prepends the root section path to the path if the given pattern matches
def around_recognize(path, env, &block)
      if path !~ %r(^/admin) and root = find_root_by_host(env)
        path.sub! recognize_pattern do
          "#{$1}/#{root.type.pluralize.downcase}/#{root.id}#{$2}"
        end
      end
      yield
    end
def around_recognize ( path , env , & block ) if path !~ %r( ^/admin ) and root = find_root_by_host ( env ) path . sub! recognize_pattern do "#{$1}/#{root.type.pluralize.downcase}/#{root.id}#{$2}" end end yield end
prepends the root section path to the path if the given pattern matches
prepends the root section path to the path if the given pattern matches
path
env
block