Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% set sectorSlug = craft.request.getSegment(2) %}
- {% set socialServiceCategory = craft.categories.group('socialServices').slug(sectorSlug).first() %}
- {% set socialServiceCategoryId = socialServiceCategory.id %}
- {% set technologyCategoryIds = [] %}
- {% if craft.request.getParam('type') %}
- {% set technologyCategoryIds = technologyCategoryIds|merge(craft.request.getParam('type')) %}
- {% endif %}
- {% set categoryIds = [socialServiceCategoryId]|merge(technologyCategoryIds) %}
- {% set entries = craft.entries({
- section: 'solutions',
- relatedTo: {
- targetElement: ['and']|merge(categoryIds)
- }
- }).order('listingType desc', 'title asc') %}
- {# the above does *not* limit entries to socialServiceCategoryId #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement