diff options
author | Silvio <silvio@socioambiental.org> | 2013-11-06 18:31:44 -0200 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-11-06 18:31:44 -0200 |
commit | 2db4b0bcdadcece93cfca91b08ed63eca4f9a167 (patch) | |
tree | 3307fa9aeab651be06dbca655a273abe5e6cae75 | |
parent | 8b337ad41af1a06be7e2fd470ca1a82f682d2517 (diff) | |
download | timelinejs-2db4b0bcdadcece93cfca91b08ed63eca4f9a167.tar.gz timelinejs-2db4b0bcdadcece93cfca91b08ed63eca4f9a167.tar.bz2 |
Fix timelinejs_node_view()
-rw-r--r-- | timelinejs.module | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/timelinejs.module b/timelinejs.module index ce48632..fe799f9 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -10,7 +10,13 @@ */ function timelinejs_node_view($node, $view_mode, $langcode) { if ($node->type == 'timeline' && $view_mode == 'full') { - $node->content['timeline']['#markup'] = timelinejs($node->nid); + if (isset($node->nid)) { + $node->content['timeline']['#markup'] = timelinejs($node->nid); + } + else { + $node->content['timeline']['#markup'] = t('Timeline will be rendered just after saving it.'); + } + $node->content['timeline']['#weight'] = -1; } } |