Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit fa6f3be

Browse files
Added a fix for issue #18 If the current node isn't published, the preview is run in the context of the homepage, but the nodeId is appended onto the querystring, so if you did need some contextual information from the node, you should be able to work it out
1 parent 387ef87 commit fa6f3be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/UI/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@
5454

5555
$scope.setPreview = function (model) {
5656
if ("enablePreview" in $scope.control.editor.config && $scope.control.editor.config.enablePreview) {
57+
console.log(editorState.current);
5758
dtgeResources.getEditorMarkupForDocTypePartial(editorState.current.id, model.id,
5859
$scope.control.editor.alias, model.dtgeContentTypeAlias, model.value,
5960
$scope.control.editor.config.viewPath,
6061
$scope.control.editor.config.previewViewPath,
61-
editorState.current.published)
62+
!!editorState.current.publishDate)
6263
.success(function(htmlResult) {
6364
if (htmlResult.trim().length > 0) {
6465
$scope.preview = htmlResult;

0 commit comments

Comments
 (0)