Page 1 of 1

Which prosilver_se template variable return content of the first post ?

Posted: Thu Jul 11, 2019 9:26 am
by dlugasny
Hi,

I`m using prosilver_se template. I need to insert some <script> inside the "viewtopic_body.php" file which will include output from variable which is storing content of the first post.

Code: Select all

<script>
....
....
     content = "{MESSAGE}"
....
....
</script>
In this documentation
https://wiki.phpbb.com/Viewtopic_Template_Variables

I haven found variable which is called "MESSAGE", but unfortunately it is not displaying anything... :/

I have used some other variables and everything is working fine, only when I`m calling this variable script returning nothing.

Maybe some one knows, how to extract body/content of the post from variable in the viewtopic_body.php in prosilver_se template ?


Thanks in advance for any support.


Cheers
Dlugasny

Re: Which prosilver_se template variable return content of the first post ?

Posted: Fri Jul 12, 2019 8:51 am
by kasimi

Code: Select all

{% if postrow.S_FIRST_POST %}
<script>
  var content = "{{ postrow.MESSAGE | escape('js') }}";
</script>
{% endif %}