0

Im trying to print the full path to my theme in my html.tpl.php file. In the following code the 2nd part prints correctly but the first part does nothing.

<?php print base_path() . path_to_theme(); ?>
4

It should be

base_path().drupal_get_path('theme', 'THEME_NAME')

Other Examples of path

$GLOBALS['base_url'] => http://example.com/drupal
base_path() => /drupal/
request_uri() =>    /drupal/documentation?page=1
request_path() => documentation
current_path() => node/26419
| improve this answer | |
0

I assumed my code wasnt working as I was expecting an absolute url but Ive now realized that when Drupal is in the route it just returns a /. So it is in fact working fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.