On Fri, Aug 27, 2010 at 9:56 PM, Chris McCreery <span dir="ltr"><<a href="mailto:chris.mccreery@gmail.com">chris.mccreery@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am trying to do the following but having issues.<div><br></div><div>I would like to insert a specific div tag in my page.tpl.php when the url alias contains yepp for example when <a href="http://www.domain.com/yepp" target="_blank">www.domain.com/yepp</a> or <a href="http://www.domain.com/yepp/page1" target="_blank">www.domain.com/yepp/page1</a></div>
<div><br></div><div>If I try using arg(0) it just returns the internal system path "node".</div></blockquote><div><br>There is more than one way of doing this. <br><br>Here is a simple one:<br><br>$a = explode('/', check_plain($_SERVER['REQUEST_URI']));<br>
if ($a[1] == 'yepp') {<br>
// Go wild<br>
}<br><br></div></div>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. -- Leonardo da Vinci<br>