I've just develop a xslt macro in order to enable pagination in a list of elements. I followed the instructions in http://www.nibble.be/?p=11 (the one with page numbers, and buttons).
My problem is that I need friendly urls instead of inserting he page number in the query string, that's to say, nowadays, the url is, for example, http://127.0.0.1/noticia.aspx?page=2 but this is not valid for me, I need something like http://127.0.0.1/noticia-2.aspx, but I'm quite lost with this.
I'd recommend you took a look at UrlRewriting - it's built in to Umbraco (the .config file is in /config/UrlRewriting.config) and you can use most of what you've built already.
Yo creo que las directivas de este código que he puesto son bastantes claras. Peor siempre tienes lo mejor a mano visita http://www.urlrewriting.net, para mayor infrmación. ¡Buena Suerte!
Pagination with friendly url
Hi!,
I've just develop a xslt macro in order to enable pagination in a list of elements. I followed the instructions in http://www.nibble.be/?p=11 (the one with page numbers, and buttons).
My problem is that I need friendly urls instead of inserting he page number in the query string, that's to say, nowadays, the url is, for example, http://127.0.0.1/noticia.aspx?page=2 but this is not valid for me, I need something like http://127.0.0.1/noticia-2.aspx, but I'm quite lost with this.
Any idea?.
Thanks!
Hi Alvaro,
I'd recommend you took a look at UrlRewriting - it's built in to Umbraco (the .config file is in /config/UrlRewriting.config) and you can use most of what you've built already.
/Chriztian
Hola Alvaro!
Segú veo eres de habla hispana,
Bueno lo primero que debes hacer es ir a la siguiente ruta dentro de tu proyecto en umbraco: config/UrlRewriting.config
Entras a este fichero, si te fijas todo esta comentado, o la mayoria de apartados
Pon este código:
<add name="newsPag"
virtualUrl="^~/noticia.aspx/page/([0-9]+)$"
rewriteUrlParameter="ExcludeFromClientQueryString"
redirectMode="Permanent"
destinationUrl="~/noticia.aspx/?page=$1"
ignoreCase="true" />
Ya con esto obtienes lo que andas buscando, entonces accedes: http://127.0.0.1/noticia.aspx/page/2 y listo.
Yo creo que las directivas de este código que he puesto son bastantes claras. Peor siempre tienes lo mejor a mano visita http://www.urlrewriting.net, para mayor infrmación. ¡Buena Suerte!
Hi,
Have a look at this threat http://our.umbraco.org/forum/core/general/32149-How-to-use-friendly-url , same solution as stated early by Chriztian.
//fuji
I'm going to take a look to all this.
Thanks to all!!
is working on a reply...