Output permalink URLs to allow remix of date as permalink
Ref https://gitlab.com/drutopia/drutopia/issues/283 This will move into Octavia or even Bulma theme ideally
This commit is contained in:
parent
8e80118041
commit
6aafa4dfe8
1 changed files with 15 additions and 0 deletions
|
@ -26,3 +26,18 @@ function geofresco_preprocess_page_title(&$variables) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for comment.
|
||||
*
|
||||
* Shortens and stacks username and submitted date.
|
||||
*/
|
||||
function geofresco_preprocess_comment(array &$variables) {
|
||||
$comment = $variables['elements']['#comment'];
|
||||
if (isset($comment->in_preview)) {
|
||||
$variables['permalink_url'] = new Url('<front>');
|
||||
}
|
||||
else {
|
||||
$variables['permalink_url'] = $comment->permalink();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue