Variable access/exchange in templates

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
RobiX
Registered User
Posts: 110
Joined: Thu Oct 05, 2017 9:59 am

Variable access/exchange in templates

Post by RobiX »

in a template i have, e.g.,

Code: Select all

<div>
<!-- IF INDEX.0 neq "" -->
  <!-- PHP -->aPhpFunction({INDEX.0});<!-- ENDPHP --> //*
<!-- ENDIF -->
</div>

*how can i access the variable here? because doesnt work
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Variable access/exchange in templates

Post by AmigoJack »

RobiX wrote: Sun Dec 03, 2017 1:39 pmINDEX.0
Block variables must be in lowercase and names should not start with numbers (just like in any other language as well). In other words: make it at least index._0.

RobiX wrote: Sun Dec 03, 2017 1:39 pm<!-- PHP -->
Consider using the template system fully by calling PHP in your PHP files, not in your template files.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
Post Reply

Return to “phpBB Custom Coding”