[CPS-users] Bookmarking CPS pages in Del.icio.us, or submitting them to Digg and so on

Jean-Marc Orliaguet jmo at ita.chalmers.se
Sun Apr 1 09:40:19 CEST 2007


Richard MAHONEY wrote:
> Dear Jean-Marc,
>
> On Sat, 2007-03-31 at 20:58, Jean-Marc Orliaguet wrote:
>   
>> Richard MAHONEY wrote:
>>     
>>> Subscribers,
>>>
>>> I am trying to add a standard set of links to the bottom of my
>>> CPS-3.4.3 pages. They will hopefully enable a user to bookmark the page
>>> in Del.icio.us, or submit it to Digg, Slashdot and so on.
>>>
>>> After reading the Zope docs and searching the net I've been unable to
>>> work out how to include the full referrer in the url sent to these
>>> services. At present I am using:
>>>
>>> tal:attributes="href string:http://slashdot.org/bookmark.pl?url=${here/portal_url}/"
>>>
>>> but of course this only returns:
>>>
>>> http://slashdot.org/bookmark.pl?url=http://indica-et-buddhica.org/
>>>
>>> Would anyone know how I might alter this expression so that it would
>>> output the full referrer?
>>>
>>>   
>>>       
>> Hi,
>> do you mean ${here/absolute_url} ?
>>
>> or:
>> ${REQUEST/ACTUAL_URL}
>>
>> and the query parameters - if needed - are in ${REQUEST/QUERY_STRING}
>>     
>
> Thank you for your comments. I have tried the following:
>
> i.)
> tal:attributes="href
> string:http://slashdot.org/bookmark.pl?url=${here/portal_url}/"
>
> ii.)
> tal:attributes="href
> string:http://slashdot.org/bookmark.pl?url=${here/absolute_url}"
>
> iii.)
> tal:attributes="href
> string:http://slashdot.org/bookmark.pl?url=${request/ACTUAL_URL}"
>
> iv.)
> tal:attributes="href
> string:http://slashdot.org/bookmark.pl?url=${request/QUERY_STRING}"
>
> Unfortunately, none of these `url=' calls consistently returns the
> current page, i.e., what the browser gives as the current page in the
> URL field. Is there still no effective way of obtaining this
> information using Zope? Are these bug reports still relevant?
>
> a.)
> Issue 1845 of Zope Bugs, Features, and Patches Collector [ZC]
> Title:   ACTUAL_URL is not actual URL ;)
> http://zope.org/Collectors/Zope/1845
>
> b.)
> Issue 1568 of Zope Bugs, Features, and Patches Collector [ZC]
> Title:   VIRTUAL_URL only available if VHM is used
> http://www.zope.org/Collectors/Zope/1568
>
> ``The short summary is that there's no good way of getting the URL of
> the current page (ie. what it actually says in the URL field) as
> opposed to what Zope reports as the object URL.''
>   

have you tried with ${request/ACTUAL_URL}?${request/QUERY_STRING}

you can display the content of <tal:block content="structure request" /> 
and get the variables you need. At least one combination ought to work?

/JM



This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.