Permalink link for comments already exist, but for node (blog post, forum topic etc.) there is no permalink link in node links, and unfortunately we have to do some coding since to my knowledge there is no module for this (Drupal 7). My point of view for permalink is a short URL from the node (the original URL before the URL aliased).
Open template.php in your theme folder, let say you still use the default theme Bartik. Paste or update below code:
/**
* Override or insert variables into the node template.
*/
function bartik_preprocess_node(&$variables) {
if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
$variables['classes_array'][] = 'node-full';
}
}To
/**
* Override or insert variables into the node template.
*/
function bartik_preprocess_node(&$variables) {
if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
$variables['classes_array'][] = 'node-full';
}
$node = $variables['node'];
global $base_url;
// Add your own custom link
$links = $variables['content']['links']['node']['#links']['permalink'] = array(
'title' => t('Permalink'),
'href' => $base_url . '/node/' . $node->nid,
'html' => TRUE,
'attributes' => array(
'title' => 'Permalink',
'rel' => 'bookmark',
'class' => 'permalink',
),
);
return $links;
}To create permalink links to nodes that use the path alias (ie already aliased using Pathauto module) then use code as follows:
/**
* Override or insert variables into the node template.
*/
function bartik_preprocess_node(&$variables) {
if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
$variables['classes_array'][] = 'node-full';
}
$node = $variables['node'];
// Add your own custom link
$links = $variables['content']['links']['node']['#links']['permalink'] = array(
'title' => t('Permalink'),
'href' => 'node/' . $node->nid,
'html' => TRUE,
'attributes' => array(
'title' => 'Permalink',
'rel' => 'bookmark',
'class' => 'permalink',
),
);
return $links;
}



nice
nice sharing dan
Septictankbiorich.comBiotech System
SeptictankbiorichBioRich, Biotech, Biofil
Surya Utama FibertechFibreglass
someday
I hope understand drupal someday, I have to learn it
baju muslim anak | grosir baju muslim | jual parfum | bantal mobil 8 in 1
wow drupal, i realy don't
wow drupal, i realy don't undestand about it, maybe i must learn about drupal, yeah
my bl projet > toko furniture online | mebel jati jepara