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

XF 1.3 Template Modifications: Replacing a block of code?

Discussion in 'XenForo Questions and Support' started by Floren, Jun 23, 2014.

  1. Floren

    Floren Well-Known Member

    I was wondering how can I replace an entire block of code like:
    Code:
        <div class="nodeInfo categoryNodeInfo categoryStrip">
       
            <div class="categoryText">
                <h3 class="nodeTitle"><a href="{xen:link categories, $category}">{$category.title}</a></h3>
                <xen:if is="{$category.description}"><blockquote class="nodeDescription baseHtml">{xen:raw $category.description}</blockquote></xen:if>
            </div>
           
        </div>
    With my own code? Thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Put the block of code in the find field, add your own code to the replace field.
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    Also, regular expression:

    Code:
    /<div class="nodeInfo categoryNodeInfo categoryStrip">(.*?<\/div>{2})/is
    That's untested as I just wrote it on my phone
     
    Kevin and Brogan like this.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Show off! :D
     

Share This Page