Drupal Path, Site base URL

<?php  echo $GLOBALS['base_url']; ?>

Theme path

 <?php drupal_get_path('theme',$GLOBALS['theme']); ?> 

or

 <?php print $GLOBALS['base_url']."/".path_to_theme() ?> 

File directory path

 <?php  echo $GLOBALS['base_url']; ?>/sites/default/files 

Comments

Submitted by shiv on Sat, 12/26/2015 - 10:36

Permalink

Tested in Drupal 7 and Drupal 8

Sample blackbox block

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas non porta odio, id mattis erat.

Nam sed tincidunt eros. Donec a venenatis odio, vitae commodo sem. Vivamus ullamcorper pellentesque erat, in adipiscing tortor scelerisque sit amet. Nulla pulvinar urna magna. Vivamus a ipsum lorem. Etiam adipiscing pulvinar lorem.