previewId of Database Result
Author: jan_bogutzki
Publication Date: 5/30/2018 12:22
Hi Community,
i have a problem to get a result of the previewId() function.
My code so far:
I have a database with blog entires. In a section we search for some of these blogentries with:
<CMS_HEADER>
<CMS_FUNCTION name="contentSelect" resultname=“set_blogs">
...
</CMS_FUNCTION>
</CMS_HEADER>
After getting the results, i loop over them and try to render them with a format template:
$CMS_FOR(_blog, set_blogs)$
$CMS_RENDER(template:"blog_teaser", blogItem:_blog)$
$CMS_END_FOR$
In my template finaly i have the line:
"_previewId":$CMS_VALUE(previewId(element:blogItem).toJSON())$,
But this returns only an empty string.
Does anybody know, how to get the right previewId of the element?
best regards
Jan
-
Author: felix_reinhold - 6/12/2018 9:50
Hi Jan,
as far as I know there is no function previewId. Do you mean editorId?
Best regards
Felix
0 -
Author: jan_bogutzki - 6/14/2018 6:24
Hey Felix,
thanks for your reply. With TPP there is such a function. Peter Jodeleit answered in a Blog entry:
Editing a datenset from a "contentSelect" function
best regards
Jan
0
Please sign in to leave a comment.
Comments
2 comments