Currently there is an option (Service Links icons > Standard folder) to configure a custom path to get the service icons but it doesn't allow dynamic paths based on environment.

For example, things like base path and path to theme can change based on the environment (eg. dev, staging, live).

It would be very useful to have some tokens to cover these things. An example of this kind of thing elsewhere is the CKEditor module, which has tokens for entering a path to an editor CSS file.

Examples of possible tokens:

  • %b: Base path - base_path()
  • %d: Path to default theme - drupal_get_path('theme', variable_get('theme_default', 'bartik'))
  • %t: Path to current theme - drupal_get_path('theme', $theme_key)
  • %m: Path to service links module - drupal_get_path('module', 'service_links')

So then an admin could enter something like "%b%t/images" and have it always be the images directory of the current theme.

CommentFileSizeAuthor
#3 service_links-path_tokens-2760649-3.patch4.82 KBrooby
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rooby created an issue. See original summary.

rooby’s picture

Issue summary: View changes
rooby’s picture

Status: Active » Needs review
FileSize
4.82 KB

Here's a patch.