Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

[SOLVED] 2.4 -> 3.1 - How to parse fields for template includes

$
0
0

So I have a HTMLText field on an object that is plonked in an include. This field often contains an internal link like /user-forms-module/. I found if I put that direct into the template, the link shortcode is not parsed.

So in 2.4 I did this, which worked perfectly:

function GetCleanInclusions() {
      return DBField::create('HTMLText', $this->TourInclusions);
   }

In 3.x, DBField is abstract and can't be instantiated. I've had a dig around, mainly in the HTMLText model class itself, and I can't find the equivalent for the latest SS.

Just like 2.4, returning the field direct results in the include displaying the text, but the link is still un parsed.

Cheers


Posted to: [SOLVED] 2.4 -> 3.1 - How to parse fields for template includes | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles