Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-14 17:32:14

Boby Dimitrov
Member
From: Sofia, Bulgaria
Registered: 2004-09-27
Posts: 76
Website

Actual preview in Write tab

Is there a way to use/apply the site CSS in Preview mode in Admin -> Content -> Write? So you can actually see the post the way it’s gonna show on the site, without actually publishing it.

Tried searching for actual preview in admin, preview in write tab and some other queries, with no luck.

Last edited by Boby Dimitrov (2007-03-14 17:32:55)

Offline

#2 2007-06-05 13:09:37

myhd
New Member
Registered: 2007-02-27
Posts: 4

Re: Actual preview in Write tab

Yeah, I do have the same issue here. I would like to preview an article before actually publishing it, and seeing as it would look on the site with all it’s CSS and stuff. I’d be so glad if anybody could help… thanks!

J.

Offline

#3 2007-06-05 13:41:31

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Actual preview in Write tab

One solution to do this, is to create a custom hidden section, preview for example. This section would not be linked anywhere, not show up on the frontpage, not on the xml feed, etc. It would use the exact page template as the wanted section (blog, article, whatever).

Then you publish your article in the preview section, and go see it.

Offline

#4 2007-06-05 13:54:17

Boby Dimitrov
Member
From: Sofia, Bulgaria
Registered: 2004-09-27
Posts: 76
Website

Re: Actual preview in Write tab

Yeah, that’s what I figured some months ago, but it’s too complicated of a task for a simple preview. Anyway, there goes wysiwyg…

Offline

#5 2007-06-05 14:09:05

myhd
New Member
Registered: 2007-02-27
Posts: 4

Re: Actual preview in Write tab

Jeremie wrote:

One solution to do this, is to create a custom hidden section, preview for example. [snip]

Thanks for the tip! I’ll check that out… though it’s quite a hack :)

J.

Offline

#6 2007-06-06 00:05:59

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Actual preview in Write tab

Textpattern was never intended to be WYSIWYG, thank god.

Applying CSS to article preview steps out of the realm of “simple”. In order to work right the article has to be stuck inside the same markup as well. As such, this enters the realm of plugin: either go the hidden section route (I do it that way, myself) or a plugin dedicated to such a feature.

Offline

#7 2008-03-20 05:28:06

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: Actual preview in Write tab

yes this frustrates me too, but how about this option…
write an article, then on the “more” tab set the timestamp to say tomorrow, hit publish. then select “view” and you can see it. once you’re happy go back to the timestamp and select “reset time to now”. maybe this is just as much work as jeremie’s suggestion though.

Offline

#8 2008-03-20 08:28:54

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: Actual preview in Write tab

Patrick did a back-end modification to preview the article in a thickbox modal window. I’m guessing the article has to be published, though? More here.


TXP Builders – finely-crafted code, design and txp

Offline

#9 2008-03-20 10:42:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Actual preview in Write tab

No mods needed

If you wrap rvm_privileged around <txp:article status="pending" /> you’ll be able to preview before going live.

Just checked it and it did not work

<txp:rvm_if_privileged><txp:article time="future" /></txp:rvm_if_privileged> might work.

Last edited by colak (2008-03-20 17:50:52)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#10 2008-03-20 21:03:48

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Actual preview in Write tab

colak wrote:

No mods needed

If you wrap rvm_privileged around <txp:article status="pending" /> you’ll be able to preview before going live.

Just checked it and it did not work

<txp:rvm_if_privileged><txp:article time="future" /></txp:rvm_if_privileged> might work.

Still, you can only view articles with status 4 or 5, therefor that <txp:article status="pending" /> won’t work. Easiest way is probably trick doArticle to think that the article is live or sticky, or another way is just remove the status filter. Because of that the <txp:article time="future" /> won’t work, it doesn’t change values in database nor the article filter – it just changes $Posted < $now to “whatever”.

Forcing status global to 1-5 would in theory work, but if I remember right it isn’t used, so it doesn’t. Statuses in query are hard coded so said. So, you possible need to do plugin or modify doArticle to query any status.

Last edited by Gocom (2008-03-20 21:06:15)

Offline

#11 2008-03-21 10:29:23

Boby Dimitrov
Member
From: Sofia, Bulgaria
Registered: 2004-09-27
Posts: 76
Website

Re: Actual preview in Write tab

mrtunes wrote:

write an article, then on the “more” tab set the timestamp to say tomorrow, hit publish. then select “view” and you can see it. once you’re happy go back to the timestamp and select “reset time to now”.

That’s what I’ve been doing for the last few years now, with each post…… :/ It’s the most simple workflow for me and yet it’s not as simple as it can be.

Offline

Board footer

Powered by FluxBB