Disable search graphics by default search plugin?

I am trying to disable the default search page for a search plugin ( http: // localhost / searchable / ), but have not found a way to do this. Does anyone know how to do this, preferably in a legal way, but resorting to fraud if necessary?

+5
source share
1 answer

I usually redirect error code handlers to the controller, so I can make some entries or something else before rendering the view. You can also use this here:

class UrlMappings {

   static mappings = {

      "/searchable/$action?"(controller: "errors", action: "urlMapping")

      "/$controller/$action?/$id?" { }

      "/"(view:"/index")

      "403"(controller: "errors", action: "accessDenied")
      "404"(controller: "errors", action: "notFound")
      "405"(controller: "errors", action: "notAllowed")
      "500"(view: '/error')
   }
}

where ErrorsController looks something like this:

class ErrorsController {

   def accessDenied = {}

   def notFound = {
      log.debug "could not find $request.forwardURI"
   }

   def notAllowed = {}

   def urlMapping = {
      log.warn "unexpected call to URL-Mapped $request.forwardURI"
      render view: 'notFound'
   }
}

and you will need to create accessDenied.gsp, notFound.gsp and notAllowed.gsp in grails-app / errors

"" , , 404, .

+4

All Articles