Sometimes I write tutorials about computer stuff. And sometimes I write lists in those tutorials. 

The problem I was having with TYPO3 when doing this was that whenever I put a <code> tag inside of an ordered or unordered list, the <code> tag wasn't properly translated on the frontend of the web site. The < and > brackets around the 'code' tag were run through htmlspecialcharacters and were showing up on the front end.

Luckily and after searching, I found a solution that allows me to put code tags in lists.

All I did was add the following to the typoscript template of my web site.

######### 

### This will allow code tag inside ul & ol

## Modified from www.mail-archive.com/typo3-english@lists.netfielders.de/msg15208.html

lib.parseFunc_RTE {

    # Processing  <ol> and  <ul> blocks separately

    //here you'll need to list all tags, you assume to be external blocks

    externalBlocks = ol, ul

    externalBlocks {

 

        ol.callRecursive=1

        ol.stripNL=1

        ol.stdWrap.parseFunc = < lib.parseFunc

 

        ul.stripNL=1

        ul.stdWrap.parseFunc = < lib.parseFunc

        ul.stdWrap.parseFunc = < lib.parseFunc

}

}

 

Share

Comments (0)

No comments found!

Write new comment