Skip to content

Commit

Permalink
TextLint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Jun 3, 2021
1 parent f8230b4 commit 2edf584
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Similar plugin for Craft CMS 3.x

Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... other related elements.
Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... Other related elements.

![Screenshot](./resources/img/plugin-logo.png)

Expand Down Expand Up @@ -47,7 +47,7 @@ The plugin has one template method, `find`, which takes a parameters object with
</ul>
```

There is also a third, optional parameter that you probably would want to use most of the time, `criteria`. `criteria` lets you create the base ElementQuery that Similar will extend, giving you the ability to use all of Craft's usual goodies for your queries. If you'd want to limit the number of entries returned (good idea!), you could do it like this:
There is also a third, optional parameter that you probably would want to use most of the time, `criteria`. `criteria` lets you create the base ElementQuery that Similar will extend, giving you the ability to use all of Crafts usual goodies for your queries. If youd want to limit the number of entries returned (good idea!), you could do it like this:

```twig
{% set limitCriteria = craft.entries.limit(4) %}
Expand All @@ -62,7 +62,7 @@ There is also a third, optional parameter that you probably would want to use mo

The supported element types are `Entry`, `Asset`, `Category`, `Tag`, `User` and `Commerce_Product`. If you miss one, send me a feature request.

The `context` parameter takes either an `ElementQuery`, or a list of ids. If you want to find similar entries based on an entry's tags and categories, you could do:
The `context` parameter takes either an `ElementQuery`, or a list of IDs. To find similar entries based on an entrys tags and categories, you could do:

```twig
{% set ids = entry.tags.ids() | merge(entry.categories.ids()) %}
Expand Down

0 comments on commit 2edf584

Please sign in to comment.