diff options
-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; } } |