You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by gbrits <gb...@gmail.com> on 2011/06/07 16:24:12 UTC
PageRenderLinkTransformer: transforming link to seo-friendly
version (with no pagename in url)
So here's the thing: I've got a url:
host/pagename/seo-friendly-stuff/id
I'd like to transform this url (using
PageRenderLinkTransformer.transformPageRenderLink) to:
host/seo-friendly-stuff/pagename-id
However, trying this I get the error: "Unable to resolve
'seo-friendly-stuff' to a known page name."
Now, I get the problem: Tapestry checks if the page "seo-friendly-stuff"
exists. However, I don't want this check performed: I'll translate the
seo-friendly url back in PageRenderLinkTransformer.decodePageRenderRequest.
So is there any way to disable checking if the page exists, so I can
implement this (not that uncommon) use-case?
Tia,
Geert-Jan
--
View this message in context: http://tapestry.1045711.n5.nabble.com/PageRenderLinkTransformer-transforming-link-to-seo-friendly-version-with-no-pagename-in-url-tp4461914p4461914.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: PageRenderLinkTransformer: transforming link to seo-friendly
version (with no pagename in url)
Posted by gbrits <gb...@gmail.com>.
OK got myself on the wrong track:
I thought I needed to create a new Link using
Link l =
this.pageRenderLinkSource.createPageRenderLink("seofriendly-stuff");
...
but the following works:
public Link transformPageRenderLink(Link
defaultLink,PageRenderRequestParameters parameters) {
return defaultlink.copyWithBasePath("/seofriendly-stuff/pagename-id");
}
--
View this message in context: http://tapestry.1045711.n5.nabble.com/PageRenderLinkTransformer-transforming-link-to-seo-friendly-version-with-no-pagename-in-url-tp4461914p4461999.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org