You are here

function _service_links_get_node_path in Service links 6.2

Same name and namespace in other branches
  1. 7.2 service_links.module \_service_links_get_node_path()

Detect if the node is used as front page and provide the path to use.

1 call to _service_links_get_node_path()
_service_links_get_tags in ./service_links.module
Fill an array with tags and the content to substitute.

File

./service_links.module, line 815
Adds social network links to the content.

Code

function _service_links_get_node_path($node) {
  static $front_page;
  if (!isset($front_page)) {
    $front_page = variable_get('site_frontpage', 'node');
  }
  $path = "node/{$node->nid}";

  //if (($node->path == $front_page) || ($path == $front_page)) {
  if (isset($node->path) && $node->path == $front_page || $path == $front_page) {
    $path = '<front>';
  }
  return $path;
}