Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-04-07 11:08:08

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Retrieve the actual page URL including parameters

Hello:

I supossed that <txp:page_url /> will give me the actual page URL, but, when using non Textpattern URL paramas, it dosen’t work.

For instante, with this article URL:

mysite.com/mi-article-permlink?foo=value&foo2=value2

<txp:page_url /> will return

mysite.com/mi-article-permlink

And I dont know a simple way to retrieve the complete url (in this case, the article permlink and the parameters pased by URL).

This is a big problem for me, specially when paginating article_custom lists filtered by params passed by the URL.

( misite.com/products?price=high&type&colour=red&size=xxl and other similar pages)

¿How can I detect the complete URL, with variables?

Thanks


<txp:rocks/>

Offline

#2 2012-04-07 11:40:58

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Retrieve the actual page URL including parameters

Have fun with adi_gps :)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2012-04-07 11:45:46

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Retrieve the actual page URL including parameters

Are you using an older Txp version? If I use <txp:page_url />, the requested URL site.com/section-name/article-permlink?foo=value&foo2=value2 returns /section-name/article-permlink?foo=value&foo2=value2.

From the wiki (attribute type="request_uri", which is the default):

request_uri: current article’s URL-title including any query string

Last edited by els (2012-04-07 14:10:06)

Offline

#4 2012-04-07 16:08:26

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: Retrieve the actual page URL including parameters

Thanks to all.

I’m looking deeper to my problem with page_url and I think it is related with the use of smd_tag plugin. I will report this issue on its forum thread.


<txp:rocks/>

Offline

Board footer

Powered by FluxBB