jan_bogutzki
I'm new here

previewId of Database Result

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions

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

View solution in original post

0 Kudos
2 Replies
felix_reinhold
Returning Responder

Hi Jan,

as far as I know there is no function previewId. Do you mean editorId?

Best regards

Felix

0 Kudos

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 Kudos