<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: $_SERVER[&#039;REQUEST_URI&#039;] in Zope</title>
	<atom:link href="http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/</link>
	<description>Team Rubber talks on the Internet in a blog</description>
	<lastBuildDate>Thu, 08 Dec 2011 13:10:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Mikko Ohtamaa</title>
		<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/comment-page-1/#comment-12449</link>
		<dc:creator>Mikko Ohtamaa</dc:creator>
		<pubDate>Tue, 12 Jan 2010 14:46:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=575#comment-12449</guid>
		<description>Ah, I so wait for WSGI compatible environ.

But meanwhile:

http://plonemanual.twinapex.fi/serving/http_request_and_response.html</description>
		<content:encoded><![CDATA[<p>Ah, I so wait for WSGI compatible environ.</p>
<p>But meanwhile:</p>
<p><a href="http://plonemanual.twinapex.fi/serving/http_request_and_response.html" rel="nofollow">http://plonemanual.twinapex.fi/serving/http_request_and_response.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AdamA</title>
		<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/comment-page-1/#comment-2665</link>
		<dc:creator>AdamA</dc:creator>
		<pubDate>Wed, 16 Sep 2009 09:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=575#comment-2665</guid>
		<description>+1 for documentation.

Thanks Martin, funnily enough this morning I need this very thing, so your comment is quite useful.

claytron, is there actually any advantage in looking up a multi adapter just to get the requested url?  My current use case is in a template so that&#039;s not really practical and seems a bit overkill for just concatenating two strings together.

It still annoys me that you have to join the two bits together with &#039;?&#039;, who votes for adding REQUEST[&#039;REQUEST_URI&#039;] to Zope?</description>
		<content:encoded><![CDATA[<p>+1 for documentation.</p>
<p>Thanks Martin, funnily enough this morning I need this very thing, so your comment is quite useful.</p>
<p>claytron, is there actually any advantage in looking up a multi adapter just to get the requested url?  My current use case is in a template so that&#8217;s not really practical and seems a bit overkill for just concatenating two strings together.</p>
<p>It still annoys me that you have to join the two bits together with &#8216;?&#8217;, who votes for adding REQUEST['REQUEST_URI'] to Zope?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: claytron</title>
		<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/comment-page-1/#comment-2643</link>
		<dc:creator>claytron</dc:creator>
		<pubDate>Fri, 11 Sep 2009 15:16:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=575#comment-2643</guid>
		<description>There are some util view classes in plone.app.layout.globals that do just this. Take a look at the context.py and you&#039;ll see you can do the following:

p_context_state = getMultiAdapter((self.context, self.request), name=u&quot;plone_context_state&quot;)

# to get the actual url
p_context_state.current_base_url()

# to get the url + the query
p_context_state.current_page_url()</description>
		<content:encoded><![CDATA[<p>There are some util view classes in plone.app.layout.globals that do just this. Take a look at the context.py and you&#8217;ll see you can do the following:</p>
<p>p_context_state = getMultiAdapter((self.context, self.request), name=u&#8221;plone_context_state&#8221;)</p>
<p># to get the actual url<br />
p_context_state.current_base_url()</p>
<p># to get the url + the query<br />
p_context_state.current_page_url()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KC</title>
		<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/comment-page-1/#comment-2642</link>
		<dc:creator>KC</dc:creator>
		<pubDate>Fri, 11 Sep 2009 15:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=575#comment-2642</guid>
		<description>+1 for Chris Rossi</description>
		<content:encoded><![CDATA[<p>+1 for Chris Rossi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Aspeli</title>
		<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/comment-page-1/#comment-2640</link>
		<dc:creator>Martin Aspeli</dc:creator>
		<pubDate>Fri, 11 Sep 2009 13:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=575#comment-2640</guid>
		<description>mmm, not quite. ACTUAL_URL does not contain a query string. For that, you have to concatenate ACTUAL_URL and QUERY_STRING. The purpose of ACTUAL_URL is to have a reliable way to get the URL the user sees, even when virtual hosting is being used.

I&#039;d also note that it&#039;s better to use something like self.request[&#039;ACTUAL_URL&#039;] instead of attribute notation. Or at least, it&#039;s in better taste. :)

Martin</description>
		<content:encoded><![CDATA[<p>mmm, not quite. ACTUAL_URL does not contain a query string. For that, you have to concatenate ACTUAL_URL and QUERY_STRING. The purpose of ACTUAL_URL is to have a reliable way to get the URL the user sees, even when virtual hosting is being used.</p>
<p>I&#8217;d also note that it&#8217;s better to use something like self.request['ACTUAL_URL'] instead of attribute notation. Or at least, it&#8217;s in better taste. <img src='http://www.teamrubber.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Martin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Rossi</title>
		<link>http://www.teamrubber.com/blog/_serverrequest_uri-in-zope/comment-page-1/#comment-2639</link>
		<dc:creator>Chris Rossi</dc:creator>
		<pubDate>Fri, 11 Sep 2009 13:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.teamrubber.com/blog/?p=575#comment-2639</guid>
		<description>Stories like this are further evidence why Zope/Plone really, really needs comprehensive reference documentation.  It&#039;s cool that you finally found the answer via Plone&#039;s rich oral tradition, but how much time (and money) was wasted in the meantime?</description>
		<content:encoded><![CDATA[<p>Stories like this are further evidence why Zope/Plone really, really needs comprehensive reference documentation.  It&#8217;s cool that you finally found the answer via Plone&#8217;s rich oral tradition, but how much time (and money) was wasted in the meantime?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

