gary
5/28/2015 - 11:03 PM

Craft CMS - Select Categories related to user

Craft CMS - Select Categories related to user


{% set categories = craft.categories({
relatedTo: { sourceElement: currentUser, field: "preference" },
limit:     null
}) %}

{% for x in categories %}

  <pre>
  {{x.title}}
  </pre>

{% endfor %}