Escape Template Tag

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

Escape Template Tag

Postby Kolazomai » Fri Mar 28, 2014 10:46 am

Hello everyone,

First of all, I've been using Pivotx for quite a while now and I'm very satisfied with it. Thanks people for this great piece of software :)

However, I encountered a problem today and I couldn't find out how to solve it:

I want to create an entry and I want to write [[a]] as pure text (in fact, in a <pre> area). I'm using the WYSIWYG editor in the ACP.
Unfortunately, PivotX tries to recognize [[a]] as a template tag and since "a" is not a valid snippet, it does not display it as text but gives an error.

Minimal failing example:
Creating a new blog entry with Introduction:
Bla [[a]] Bla


Problem:
Code: Select all
(...)
        <p>Bla
<!-- Unrecognized template code: [[ a ]]
It's either a disabled PivotX extension or a deprecated Pivot snippet/snippet syntax. -->
 Bla</p>(...)


More HTML output:
Code: Select all
(...)
<div id="content">
   <div id="innerContent">
      <div id="entries2">
        <div class="entry">

        <p class="entrynavigation">
            <a href="/?w=weblog">Home</a> |
           
        </p>   

        <h2><a href="/?e=32">Minimal Failing Example</a></h2>

        <h3>Minimal Failing Example</h3>

        <p>Bla
<!-- Unrecognized template code: [[ a ]]
It's either a disabled PivotX extension or a deprecated Pivot snippet/snippet syntax. -->
 Bla</p>

    <div>
       <p style="float: left"><span class="date"></span></p>
        <p style="float: right"><span class="date">
            Friday 28 March 2014
        </span></p>
    </div>

        <p class="comments"></p>
       
        <div class="commentblock">
            <a id="comm"></a>
       
        </div>

            <!-- No comments for you! -->

        </div>
      </div><!-- End of entries -->

      <div style="clear:both"> &nbsp; </div>

   </div><!-- end of innerContent -->
</div><!-- end of Content -->
(...)


How do I escape the '[[' and ']]' delimiter for such text?

Background: I'm trying to post some haskell code, and list of lists of an arbitrary type are defined as [[a]].

Thank you for your help,
Kolazomai
Kolazomai
 
Posts: 2
Joined: Fri Mar 28, 2014 10:33 am

Re: Escape Template Tag

Postby Harm10 » Sat Mar 29, 2014 1:52 pm

You can use [[ldelim]] to display [[ and [[rdelim]] to display ]]
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Escape Template Tag

Postby Kolazomai » Sun Mar 30, 2014 12:19 pm

Hello!

Thanks, this solves my problem. :)
Kolazomai
 
Posts: 2
Joined: Fri Mar 28, 2014 10:33 am


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 11 guests

cron