0

I'm building a new fieldtype which should be used with:

  • single tag:

    {myfield}

...which correctly calls replace_tag() method

  • single tag with modifier:

    {myfield:modifier}

...which correctly calls replace_tag_catchall()

  • tag pair:

    {myfield}{somedata}{/myfield}

...which correctly calls replace_tag()

  • but I also need tag pair with modifier:

    {myfield:modifier}{somedata}{/myfield:modifier}

...which should call replace_tag_catchall(), but it's not calling anything.

The documentation is relatively clear that it should work.

Any idea how I can make the miracle happen?

1 Answer 1

1

Fieldtype tag pairs with modifiers SHOULD NOT contain the modifier in the closing tag.

Wrong:

{myfield:modifier}{somedata}{/myfield:modifier}

Right:

{myfield:modifier}{somedata}{/myfield}
1
  • And sadly, Matrix, as the Murphy law applies, requires that the closing tag contains the modifier... And it works with tags pairs but not with single tags. Well, I need a beer...
    – pvledoux
    Commented Jul 16, 2014 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.