Which prosilver_se template variable return content of the first post ?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
dlugasny
Registered User
Posts: 10
Joined: Wed Jan 16, 2019 1:22 pm

Which prosilver_se template variable return content of the first post ?

Post by dlugasny » Thu Jul 11, 2019 9:26 am

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

User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3942
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

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

Post by kasimi » Fri Jul 12, 2019 8:51 am

Code: Select all

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

Post Reply

Return to “phpBB Custom Coding”