Say a module has a block, and one of the variables for the block is:

  $vars['some_asset'] = url(drupal_get_path('module', 'mymodule') . '/assets/cool_icon.png');

This gets re-written and the resulting image path doesn't exist. There are ways of working around this, but I am wondering is a there a special trick whereby a module developer makes this code compatible with purl?

Comments

bblake’s picture

There is, in certain functions like url() or l() you can add an option to disable purl rewriting. Like:

  $vars['some_asset'] = url(drupal_get_path('module', 'mymodule') . '/assets/cool_icon.png', array('purl' => array('disabled' => TRUE)));
bblake’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.