• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Template modification - how to replace all occurrences?

abdfahim

Active member
#1
I am trying the following in a template modification in member_view template

Find:
Code:
/<h3 class="textHeading">{xen:phrase (.+?)}<\/h3>

                        <div class="primaryContent">/
Replace:
Code:
<h3 class="subHeading">{xen:phrase $1}</h3>

                        <div class="primaryContent abdfahim-member-view-information">
But the above only replaces the first occurrence, whereas I want to replace all.

First occurrence (replaced):
upload_2017-7-30_12-24-3.png


2nd occurrence (not replaced):
upload_2017-7-30_12-27-14.png

3rd occurrence (not replaced):
upload_2017-7-30_12-28-14.png
 

abdfahim

Active member
#2
Also, the 'g' modifier throws an exception in the template modification system
Code:
/<h3 class="textHeading">{xen:phrase (.+?)}<\/h3>

                        <div class="primaryContent">/g