Omitting current entry from list of entries generated from a relationship On my template I am showing detail of an entry.
Beneath this I am showing a list of other entries that share the same kind of category relationship as the entry being viewed.

This list currently includes the entry being viewed and I wish to omit that from the list.

I'm retrieving the entries like so:

{% for category in craft.entries.section('apprenticeshipsCats').relatedTo(entry).id('not ' ~ entry.id) %}


and had expected the 'not' parameter to do what I wanted but it doesn't seem to be working. entry.id is outputting the correct ID and even if I hardcode the entry id then it still appears in the list.
You probably kind of confuse your "apprenticeships categories" with your "apprenticeships" section. Try something like this instead:

{% set relatedEntries = craft.entries({
    section: apprenticeships,
    id: 'not ' ~ entry.id,
    relatedTo: {
        targetElement: entry.apprenticeshipsCatsField
    }
}) %}


You now want to order them by your categories? Have a look at my answer I just posted here: "How do I display entries, grouped by distinct categories...".