Search widget - how to do a search of the current URL path?


#1

Hi folks,

I’m running a Drupal 6 site and am looking to get this behavior in a sidebar for any story URL you happen to be on.

To generate this code, I went to the Widgets in Twitter and created a Search widget for one specific URL.
I then altered that code to replace the sample URL with a php variable that was the current page’s path.

<?php $current_url = 'http://' .$_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI']; ?>

Tweets

But instead of the new URL I get the tweets for the URL I originally created the widget with.
I assume this is because it is created on Twitters end and referenced through the data-widget-id

Is there another way I can accomplish this, so that when a user looks at a story they can see who is tweeting it?

thanks


#2

The new widgets do not yet support any kind of dynamics like this – what you configure on the configuration page is what your widget is capable of – including search terms.


#3

Thanks for the reply.
I was inspired to try something like this based on the analytic report page for the AddThis service (per URL path) … but looks like I’ll have to approach it differently


#4