0

I'm trying to extend a plugin to allow for a limit to be added to the database call but it's throwing an error:

Missing argument 1 for Craft\Curate_UsersContentService::getRank(), called

The services file has a function in it called getRank() and I've added a $count variable to it getRank($count). My twig template then calls it with the following code:

{% set count = 10 %}
{% set rank = craft.curate.getRank(count) %}

But the above error is thrown. What an I missing?

Any clues appreciated.

1 Answer 1

1

Ok so worked this out whilst working on another plugin. I had to add a variable to the CurateVariable file in order for the template to be able to use the function. Problem solved.

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.