Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-12-23 15:27:41

From: Leeds, UK
Registered: 2006-01-29
Posts: 9,637

Re: Cannot use $this as parameter

Yeah you can’t use $this as it’s reserved by PHP. So just swap it out:

function tcm_is_this($atts, $thing)
        global $pretext, $thisarticle, $pretext;
           return $thing;

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp


#12 2018-12-23 16:28:28

New Member
Registered: 2018-12-22
Posts: 9

Re: Cannot use $this as parameter

Thanks jakob and Bloke.

I figured it out. The description says: “A Simple tag to find out if the listed article is requested”, so digging through my TXP forms I saw that I used this tag to assign a custom class to currently selected menu items (to highlight them, basically).

“Oh that was many moons ago” :)


Board footer

Powered by FluxBB