Pass block configuration item text field value to variable
So if this is for admin/editors only, one way to do it is to use the built-in Drupal hook_settings_form in your custom module. Here is a nice DO tutorial: https://www.drupal.org/docs/7/creating-custom-modules/creating-the-configuration-form

So in your case, this could look something like: 

/**
 * Implements hook_settings_form() to configure module.
 */
function roadmap_settings_form($settings) {

  $form = array();
  $form['roadmap_url'] = array(
      '#type' =&gt; 'text_format',
      '#title' =&gt; t('Enter an alternative URL.'),
  );
  return system_settings_form($form);
}


this form will save the value as a system variable 'roadmap_url' or whatever value you enter in the form field's machine name. you'd probably need to call this from some admin page in your custom module like so:

/**
 * Implements hook_menu().
 */
function roadmap_menu() {
  return array(
    'admin/config/roadmap_OR_SOME_OTHER_PATH' =&gt; array(
      'title' =&gt; t('Roadmap settings'),
      'page callback' =&gt; 'drupal_get_form',
      'page arguments' =&gt; array('roadmap_settings_form'),
      'access arguments' =&gt; array('administer roadmap OR SOME OTHER PERMISSION'),
      'type' =&gt; MENU_LOCAL_TASK,
    ),
  );
}


Now you should be able to go to your config page, enter your URL setting and it will be saved automatically by Drupal. To access this variable, you just need to call:

$url = variable_get('roadmap_url');