I am currently developing a blogging system with Ruby on Rails and want the user to define his "permalinks" for static pages or blog posts, meaning:
the user should be able to set the page name, eg. "test-article" (that should be available via /posts/test-article) - how would I realize this in the rails applications and the routing file...
Helo,
I try to have an URL like this /Forum/Index/2
for url I have a route {controller}/{action}/{page} in my global.asax
If i test the above url with the Route Debugger it corresponds to the above route ( and some other but this is the fist one in the list ) but if I create an url with the ActionLink ( like this : <%= Html.ActionLi...
I have a MVC.NET application with one route as follows:
routes.MapRoute("member", "member/{id}/{*name}", new { controller = "member", action = "Details", id = "" }, new { id = @"\d+" });
Thus, a link could be something like this: http://domain/member/123/any_kind_of_username
This works fine in general but if the path contains illegal ...
I am a rails rookie and fear that my question is woefully ignorant - please be gentle.
I am building an app that will catalog and monitor other websites, and need to synchronize with an external data source (thus overiding primary key).
I have the model below, but i cannot figure out the routing for accessing individual records (tho li...
I have the following url I need to support in my asp.net mvc project for a while.
http://www.example.com/d.aspx?did=1234
I need to map this to this url.
http://www.example.com/Dispute/Detail/1234
I have already looked at the following information.
http://blog.eworldui.net/post/2008/04/ASPNET-MVC---Legacy-Url-Routing.aspx
http://s...
In bootstrap.php, where you set routes, I'm having a hard time getting them to work. I read some documentation a while ago that I can't seem to find again that explains them. Here is one of my examples
Route::set('products', 'products/(type)', array('type' => '.+'))
->defaults(array(
'controller' => 'articles',
'action' => '...
I have a site that operates in different geographical locations. Some example URLs for my site would be:
http://losangeles.example.com
http://sandiego.example.com/post/blog/travel/
http://sfbay.example.com/blog/read/12/
In these examples, my URL structure is translated to the following:
http://[location code].example.com/[controller]...
In rails, on can show the active routes with rake (http://guides.rubyonrails.org/routing.html):
$ rake routes
users GET /users {:controller=>"users", :action=>"index"}
formatted_users GET /users.:format {:controller=>"users", :action=>"index"}
POST /users {:controller=>"users", :action=>"cr...
I have a set of rather static pages wich I moved to the views/pages folder. The resulting *.ctp files are editable by my customer through CushyCMS (simplistic cms perfect for dummy proof editing). However CushyCMS generated preview links that obviously don't take CakePHP into account. I would like to solve this little problem with custom...
I am part of a development team implementing a large application. There are several layers to the application, and we'd like to make the organization of files as easy to maintain as possible, but also follow best practice.
Here is an example of how this is laid out based on MVC convention.
UIProject
- Controllers
- HomeController.cs...
Here is my dilemma. I have a collection of entities that I want to use to define as the starting point for a set of routes. For example, I want to give all of the users in my site their own "subsites" of the form mydomain.com/username, and then hang all of the UserController actions off of that.
Here is a rough example of what I am doi...
Is there a way to create a base controller implementation that handles all the routes?
IE /home/index and /about/index all point to one controller method and that returns the view.
The site I am building is 90% static content and I dont want to go and create 50 controllers.
One should be fine?
...
Hello, I have a site, say, example.com, which is PHP. I am converting it to Rails, but there are three years worth of issues (like magazine issues) that I don't want to update. Thankfully, it seems that I chose an advantageous url format, ie. all issues start with two digits, then the name of the file in most cases
example.com/00/aut...
I am attempting to deploy an ASP.NET MVC application in a subdirectory of an existing application and I am running into some routing issues. I have set up the folder structure such that all of the binaries and config files for the MVC app are correctly located in the root directory, while the rest of the content is in the subdirectory. A...
Hi guys
I have a base controller that I use to return basic views like this.
public ActionResult Index(string pageName)
{
return View(pageName);
}
public ActionResult LanguageSpecific(string ul, string pageName)
{
var result = View("sv/" + pageName);
return View(...
I have a route like this in my global.asax.cs:
routes.MapRoute(
"NewsArticles",
"News/{page}",
new { controller = "News", action = "Index", archive = false }
);
How can I restrict access to this route so that it's only encountered if the user uses an integer?
...
I'm getting a strange error on my webserver for seemingly every file but the .aspx files.
Here is an example. Just replace '/robots.txt' with any .jpg name or .gif or whatever and you'll get the idea:
The controller for path '/robots.txt'
was not found or does not implement
IController.
I'm sure it's something to do with how I...
I've defined a route in Application_Start, as so many tutorials have instructed
RouteTable.Routes.Add(
"Files",
new Route("Files/Art",
new FileRouteHandler()));
And created my own RouteHandler. However this doesn't seem to work at all.
When I debug the application, I can see (via a break point)...
I'm using the System.Web.Routing.UrlRoutingModule.
With that I'm writing:
routes.Add(new Route(@"cart/add", new RouteHandler("~/Order/CartAdd.ashx")));
routes.Add(new Route(@"cart/delete", new RouteHandler("~/Order/CartDelete.ashx")));
...
And I also have one route called:
routes.Add(new Route(@"{*url}", new RouteHandler("~/Error/Pa...
Error Message:
The route "default" does not exist.
Yes, it doesn't exist. But as described in the Doctrine version of "Practical Symfony | Day 5" everything should work well when default routing is removed, because all actions of the job module has been successfully routed by other routers.
I get the error when I request the URL below...