[themes] Themeing based on url alias path

Victor Kane victorkane at gmail.com
Sat Aug 28 02:12:17 UTC 2010


Would have to try it, but you might have to pass the drupal path through
the http://api.drupal.org/api/function/drupal_get_path_alias/6 function
first, and then do a text search for yepp

Victor Kane
http://awebfactory.com.ar

On Fri, Aug 27, 2010 at 11:07 PM, Khalid Baheyeldin <kb at 2bits.com> wrote:

> On Fri, Aug 27, 2010 at 9:56 PM, Chris McCreery <chris.mccreery at gmail.com>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 or
>> www.domain.com/yepp/page1
>>
>> If I try using arg(0) it just returns the internal system path "node".
>>
>
> There is more than one way of doing this.
>
> Here is a simple one:
>
> $a = explode('/', check_plain($_SERVER['REQUEST_URI']));
> if ($a[1] == 'yepp') {
>   // Go wild
> }
>
> --
> Khalid M. Baheyeldin
> 2bits.com, Inc.
> http://2bits.com
> Drupal optimization, development, customization and consulting.
> Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
> Simplicity is the ultimate sophistication. --   Leonardo da Vinci
>
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20100827/1f718f57/attachment.html 


More information about the themes mailing list