I think you will always get "node" for arg(0) when the pages under /teens are nodes. <br>So <br>
switch (arg(0)) {<br> case 'teens':<br>will never happen.<br>It works for admin because those pages are no nodes.<br><br>To get teens when the path alias is /teens you should use<br><div class="codeblock"><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><?php<br>
</span><span style="color: rgb(255, 128, 0);">//explode() will split the given string with another string and put the pieces into an array<br> </span><span style="color: rgb(0, 0, 187);">$path_pieces </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">explode</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'/'</span><span style="color: rgb(0, 119, 0);">, </span><span style="color: rgb(0, 0, 187);">drupal_get_path_alias</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$_GET</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'q'</span><span style="color: rgb(0, 119, 0);">]));<br>
<br> </span><span style="color: rgb(255, 128, 0);">//so if your path is /abc/def, $path_pieces is now like Array ( [0] => abc [1] => def )<br><br> //Therefore, $path_pieces[0] prints 'abc' that you wanted<br>
</span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">$path_pieces</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(0, 0, 187);">0</span><span style="color: rgb(0, 119, 0);">];<br>
</span><span style="color: rgb(0, 0, 187);">?></span></span></code></div>See <a href="http://drupal.org/node/227849">http://drupal.org/node/227849</a>.<br><br>Good luck!<br><br>Hans<br><a href="http://www.koba.be">www.koba.be</a><br>
<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
<br>
</div>Still not working for me. I placed this at the top of my theme's<br>
<div class="Ih2E3d">template.php:<br>
<br>
switch (arg(0)) {<br>
case 'admin':<br>
drupal_add_css(path_to_theme() .'/admin.css', 'theme', 'all');<br>
break;<br>
</div> case 'teens':<br>
drupal_add_css(path_to_theme() .'/teens.css', 'theme', 'all');<br>
break;<br>
}<br>
<br>
The url path I'm trying to change the css for is /teens and the css file I'm<br>
trying to use is teens.css. I've tried clearing the cache, but when I view<br>
the source of the teens page, there's no reference to teens.css. Is there<br>
something else I missed? Can I also use this with wildcards? (case 'teens/*'<br>
so that all pages within that area get that theme)<br>
<br>
Thank you so much for your time in helping me with this.<br>
<font color="#888888"><br>
- jody<br>
</font><div><div></div><div class="Wj3C7c"><br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br><br clear="all"><br>