I have been wondering about the preview-function and its purpose for a couple of days now. I my head a preview-button is available, so that a logged in user can see the page before the changes are publish. Just to be sure that everything is correctly placed and so on.
But this is not what is going on in Umbraco. Here I can only preview my page with the content that have already been published. But if that's correct, then I can't see the purpose of the button? Because if the content is already published, and avalable for everyone too see on the website, I could just go and look at it there.
Am I the one thinking in a wrong way, is it a bug or is everything just right? I'm just very currious about this.
Is it only parts of the page that are not appearing until published? I have issues in the preview window with XSLT based macros not displaying until the page has been published but the remainder of the content displays just fine, in most cases it just means that the primary/secondary navigational elements are not visible.
Agree with Simon, normal page fields should be displayed fine. Macro content is based on the umbraco.config (content xml) file. So to display the macro content the document must be published. When it's published it's possible to preview the changes without publishing first, because the document exists in the Umbraco.config file.
And if you have user controls referencing properties on the page itself, they must use the Document API, not the nodeFactory, which was the error i made.
Yes I do save my content before I preview my page. But Simon and Richard are right. If I just use a pagefield to render my content, the preview-function works fine.
But I dont do that. I use XSLT to render all of my content, 'cause if a field is empty, I don't want to write out an empty div-element (Not a problem i the modern browsers, but IE fucks it up).
Isn't there some way to get around this?
@Richard:
I don't understand this part: "When it's published it's possible to preview the changes without publishing first".
As Richard mentioned, without the page being published it will not exist in the (confusingly named) umbraco.config xml file, I am not sure of any way around this without an initial publish.
I do not have a solution for the partial preview problem, but I wish there was!
For me and my clients the preview function as it is now is not very usefull, because a lot of pages use macros and these cannot be previewed (unless published before). I hope a future version of Umbraco will have a solution for this.
I'm thinking of a second version of the umbraco.config xml-file that contains both published and unpublished nodes, to be used for the preview only. It could be disk based only (no in-memory cache) to save resources. Richard, do you think something like this is currently achievable using the Umbraco API?
In the meantime, I sometimes use umbracoNavihide as an alternative. I mean first set umbracoNavihide to true, then publish the page and use the Link to document URL as preview link. Of course this is not safe if you have confidential content, but in some cases it is acceptable.
I agree that your solution would be a workaround until something more solid is implemented in the core to address this but the problem is that you then have to advise clients/users how to use the preview 'hack' rather than using the very obvious preview button.
@ Kim, sorry that should be When it's published it's possible to preview the changes without republishing first
@Arjan/@all , if you want a real preview environment it's better to buy Courier. In that way you have a full staging environment. I did a lot of Tridion implementations in the past and they had the same issue. Preview is just to view content and the staging environment is to see how the complete site looks after the publish. I 'don't think you can simulate a staging environment by using the API. Maybe if you build a complete custom solution/hack.
@Richard: my problem is not that content from other unpublished pages is not shown in the preview, but that content from the current page in a macro (or inline xslt) is also not rendered when using the preview. For example when you have a macro to display images or related links, these are visible in the preview.
But I gues that is also, only when the content is rendered through a pagefield right? Because even though a page have been published, the function still only worsk if the content is rendered by a pagefield.
Well, I just hope that this could be changed in the future some time. And if anyone finds a nice workaround, I hope that they'll share it off course.
To use super preview all I need to do is to copy/past your dll and .config file in the config section of umbraco...is that right???? How can I use SuperPreviewJump aspx form and the icon?? ????? Sorry but I've began yesterday with umbraco and I need to learn quick. Actually I'm using 4.7.2 version.
Preview function only shows published items
I have been wondering about the preview-function and its purpose for a couple of days now. I my head a preview-button is available, so that a logged in user can see the page before the changes are publish. Just to be sure that everything is correctly placed and so on.
But this is not what is going on in Umbraco. Here I can only preview my page with the content that have already been published. But if that's correct, then I can't see the purpose of the button? Because if the content is already published, and avalable for everyone too see on the website, I could just go and look at it there.
Am I the one thinking in a wrong way, is it a bug or is everything just right? I'm just very currious about this.
You are correct in thinking that the preview button allows you to preview changes before they are published.
So there's either something wrong with your set up or you are doing something wrong.
Are you pressing the 'Save' button before you preview? Otherwise you won't see your changes.
Do you have any user controls on the page you try to preview ?
I had a probllem with previewing pages that had a user control on it that "referenced the page itsefl".
Mikael
Is it only parts of the page that are not appearing until published? I have issues in the preview window with XSLT based macros not displaying until the page has been published but the remainder of the content displays just fine, in most cases it just means that the primary/secondary navigational elements are not visible.
Agree with Simon, normal page fields should be displayed fine. Macro content is based on the umbraco.config (content xml) file. So to display the macro content the document must be published. When it's published it's possible to preview the changes without publishing first, because the document exists in the Umbraco.config file.
Cheers,
Richard
And if you have user controls referencing properties on the page itself, they must use the Document API, not the nodeFactory, which was the error i made.
Mikael
Yes I do save my content before I preview my page. But Simon and Richard are right. If I just use a pagefield to render my content, the preview-function works fine.
But I dont do that. I use XSLT to render all of my content, 'cause if a field is empty, I don't want to write out an empty div-element (Not a problem i the modern browsers, but IE fucks it up).
Isn't there some way to get around this?
@Richard:
I don't understand this part: "When it's published it's possible to preview the changes without publishing first".
As Richard mentioned, without the page being published it will not exist in the (confusingly named) umbraco.config xml file, I am not sure of any way around this without an initial publish.
I do not have a solution for the partial preview problem, but I wish there was!
For me and my clients the preview function as it is now is not very usefull, because a lot of pages use macros and these cannot be previewed (unless published before). I hope a future version of Umbraco will have a solution for this.
I'm thinking of a second version of the umbraco.config xml-file that contains both published and unpublished nodes, to be used for the preview only. It could be disk based only (no in-memory cache) to save resources.
Richard, do you think something like this is currently achievable using the Umbraco API?
In the meantime, I sometimes use umbracoNavihide as an alternative. I mean first set umbracoNavihide to true, then publish the page and use the Link to document URL as preview link. Of course this is not safe if you have confidential content, but in some cases it is acceptable.
I agree that your solution would be a workaround until something more solid is implemented in the core to address this but the problem is that you then have to advise clients/users how to use the preview 'hack' rather than using the very obvious preview button.
@ Kim, sorry that should be When it's published it's possible to preview the changes without republishing first
@Arjan/@all , if you want a real preview environment it's better to buy Courier. In that way you have a full staging environment. I did a lot of Tridion implementations in the past and they had the same issue. Preview is just to view content and the staging environment is to see how the complete site looks after the publish. I 'don't think you can simulate a staging environment by using the API. Maybe if you build a complete custom solution/hack.
Cheers,
Richard
@Richard: my problem is not that content from other unpublished pages is not shown in the preview, but that content from the current page in a macro (or inline xslt) is also not rendered when using the preview. For example when you have a macro to display images or related links, these are visible in the preview.
@Richard
Ahh then I get it :)
But I gues that is also, only when the content is rendered through a pagefield right? Because even though a page have been published, the function still only worsk if the content is rendered by a pagefield.
Well, I just hope that this could be changed in the future some time. And if anyone finds a nice workaround, I hope that they'll share it off course.
Hi Arjan,
Yes that is the behaviour because it's not in the xml file.
@Kim Yes now you get it :)
Would indeed be nice if there is a method to make the preview work in all cases..
Cheers,
Richard
Sorry for stupid question...
To use super preview all I need to do is to copy/past your dll and .config file in the config section of umbraco...is that right???? How can I use SuperPreviewJump aspx form and the icon?? ????? Sorry but I've began yesterday with umbraco and I need to learn quick. Actually I'm using 4.7.2 version.
Thanks
Pippo Pluto Paperino
is working on a reply...