[themes] Themeing based on url alias path

Peter Anderson list at panda.id.au
Sat Aug 28 09:11:56 UTC 2010


This should do what you want, without being overly complicated:

$arguments = explode('/', request_uri());
if (in_array('yepp', $arguments)) {
   // Insert div
}

As an added bonus, 'request_uri()' is a Drupal function: 
http://api.drupal.org/api/function/request_uri/6


On 28/08/10 11:56, Chris McCreery wrote:
> I am trying to do the following but having issues.
>
> I would like to insert a specific div tag in my page.tpl.php when the 
> url alias contains yepp for example when www.domain.com/yepp 
> <http://www.domain.com/yepp> or www.domain.com/yepp/page1 
> <http://www.domain.com/yepp/page1>
>
> If I try using arg(0) it just returns the internal system path "node".
>
> Any help would be greatly appreciated.
>
> Thank you
>
> -- 
> Chris McCreery
>
>
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>    

-- 
Kind regards,
Peter Anderson.
http://panda.id.au

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20100828/ad7b4051/attachment.html 


More information about the themes mailing list