Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-05-26 13:47:47

wms
New Member
From: Herford, Germany
Registered: 2010-07-09
Posts: 6

plugin in article preview

hi at all, is it posible to run plugins in the article preview? So if a article is in draft or hidden mode, i can only see the output from the body of an article in the preview. but in this preview no plugin or php code are running.

i have wrote an own plugin for additional aticle fields. this fields i can at in the body with <txp:myplugin field=“xyz” />. on the frontend when the article is in live mode it works fine for me. but not in the preview tab.

thanks.

Offline

#2 2014-05-26 18:34:01

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

Re: plugin in article preview

wms wrote #281060:

hi at all, is it posible to run plugins in the article preview?

No, the view is run in its in own context at the backend. The preview is merely a markup render view of the content; used to preview the results of the used text formatting language, like Textile or Markdown. Executing any code or template tags used in the article body would lead into errors as the executed context isn’t the same as in the template and could even open up potential security issues.

Offline

#3 2014-05-27 06:53:06

wms
New Member
From: Herford, Germany
Registered: 2010-07-09
Posts: 6

Re: plugin in article preview

Gocom wrote #281061:

No, the view is run in its in own context at the backend. The preview is merely a markup render view of the content; used to preview the results of the used text formatting language, like Textile or Markdown. Executing any code or template tags used in the article body would lead into errors as the executed context isn’t the same as in the template and could even open up potential security issues.

ok thank u.

Offline

Board footer

Powered by FluxBB