All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Add Plugin Formatting

Tim Kelty 9 Jun 2010 17:31 idea,

It would be great if either per variable you could specify text formatting (via available plugins) or in the templates be able to do something like {lv_this_var formatting="smarty_pants"}

Replies

  1. Low 21 Jun 2010 10:54

    Hey Tim,

    I've added formatting to the Textarea variable type (see docs), so you could do this with those types, using template tags like this:

    {exp:low_variables:parse var="my_textarea_var" format="textile"}

    If you want to add formatting to other vars, you'll need to either turn on early parsing or use the template tags, in combination with the formatting plugin tags, like this (using an early parsed var):

    {exp:textile}{my_early_parsed_var}{/exp:textile}

    or this (using template tags):

    {exp:textile}{exp:low_variables:parse var="my_var"}{/exp:textile}

    .

  2. Tim Kelty 21 Jun 2010 11:08

    Bacon Goodness.

    Love it!

  3. Kyle Batson 6 Jul 2010 14:54

    This is a weird one. I used the formatting you have here on me EE2 installation. It works on my internal pages, but not on the home page.

    When I load the home page it says:
    A PHP Error was encountered

    Severity: Notice

    Message: Undefined property: EE::$typography

    Filename: low_textarea/vt.low_textarea.php

    Line Number: 110

    Fatal error: Call to a member function parse_type() on a non-object in /nfs/c01/h08/mnt/840/domains/bluestem.shinkadesign.com/html/bluesystem735/expressionengine/third_party/low_variables/types/low_textarea/vt.low_textarea.php on line 110

  4. Low 6 Jul 2010 16:11

    Hmm, looks like the Typography class isn't loaded in all cases, and I cannot duplicate the error, even in a completely empty template. Try this, if you will:

    - Open up vt.low_textarea.php in a text editor
    - Go to line #110 and add a blank line above it
    - On that line add this code:

    $this->EE->load->library('typography');

    - Save the file.

    Does that help?

    Low 6 Jul 2010 16:15

    Looks like I can reproduce the error. The above fix should resolve the issue.

  5. Kyle Batson 6 Jul 2010 16:17

    Yup, that did it! Thanks.