You are here

function splashify_display_splashtext in Splashify 7

Same name and namespace in other branches
  1. 6 splashify.display.inc \splashify_display_splashtext()

Display the What: Content either in the site template or full screen.

Return value

string If the $what_mode equals 'template', returns the string entered into $what_content_value. If $what_mode equals 'fullscreen', it displays the text right there and exits the request.

1 string reference to 'splashify_display_splashtext'
splashify_menu in ./splashify.module
Implements hook_menu().

File

./splashify.display.inc, line 313
Handles displaying the splash page.

Code

function splashify_display_splashtext() {
  $config = _splashify_get_config();
  $what_mode = $config['what_mode'];
  $what_content_value = $config['what_content_value'];
  $what_content_title = $config['what_content_title'];
  if ($what_mode == 'template') {

    // Display what they entered in the field in the site template.
    if (!empty($what_content_title)) {
      drupal_set_title($what_content_title);
    }
    return $what_content_value;
  }
  elseif ($what_mode == 'fullscreen') {

    // Display what they entered in the field as a full page.
    echo $what_content_value;
    drupal_exit();
  }
}