Display all entries matching field of a section I have two sections:
Games
Publishers

Games has a field called 'GamesPublisher' that is Entries type (set to Publishers)

I have a publisher called 'Microsoft' with an ID of 49.

I want to display all Game entries for the Publisher 'Microsoft' (ie ID 49)

I also want to set the order of the displaying in ASC order based on the field 'GamesCatalogNumber' which is in the section Games.

So far, it looks OK, but I have yet to figure out to limit entries to a specific Publisher.
http://www.colorcomputergames.com/tandy-catalog/

{% set entries = craft.entries.section('games').relatedTo(entry) %}
    &lt;ul&gt;
    {% for entry in entries.order('GamesCatalogNumber desc') %}
     &lt;li&gt;{{ entry.GamesCatalogNumber }}: &lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
    {% endfor %}
    &lt;/ul&gt;

    {# Set parameters for prev/next elements list #}
    {% set params = craft.entries.section('publishers').order('title asc') %}

    {# Get the prev/next elements #}
    {% set prevEntry = entry.getPrev(params) %}
    {% set nextEntry = entry.getNext(params) %}

    {# And make sure to only output the links if the element exists #}
    {% if prevEntry %}&lt;a href="{{ prevEntry.url }}"&gt;Previous Publisher&lt;/a&gt;{% endif %}
    {% if nextEntry %}&lt;a href="{{ nextEntry.url }}"&gt;Next Publisher&lt;/a&gt;{% endif %}
Looks to me like your solution is mostly correct, except for handling the gamesCatalogNumber. For that you could either:


test for specific publisher(s) by id or slug
test if gamesCatalogNumber is empty on the first entry (and assume that the publisher doesn't use catalog numbers), or 
(recommended solution) add a checkbox or lightSwitch field to the publisher called 'usesCatalogNumbers' and test for that.


Something like:

{# publisher template #}

{% if entry.usesCatalogNumbers %}
    {% set games = craft.entries.section('games').relatedTo(entry).order('gamesCatalogNumber desc') %}
{% else %}
    {% set games = craft.entries.section('games').relatedTo(entry).order('title asc') %}
{% endif %}

&lt;ul&gt;
    {% for game in games %}
        &lt;li&gt;{% if entry.usesCatalogNumbers %}{{ entry.gamesCatalogNumber }}: {% endif %}&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;

{% set params = craft.entries.section('publishers').order('title asc') %}
{% set prevEntry = entry.getPrev(params) %}
{% set nextEntry = entry.getNext(params) %}
{% if prevEntry %}&lt;a href="{{ prevEntry.url }}"&gt;Previous Publisher&lt;/a&gt; {% endif %}{% if nextEntry %}&lt;a href="{{ nextEntry.url }}"&gt;Next Publisher&lt;/a&gt;{% endif %}


I recommend this (instead of the other options) because it's a bit more explicit and extensible (i.e. allows you to add other publishers that use catalog numbers without modifying the templates).