# \[podlove-episode-contributor-list\] not returning a list

**URL:** <https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476>\
**Category:** Podlove Publisher\
**Created:** [January 1, 2016, 8:09pm UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476 "2016-01-01T20:09:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joey](https://community.podlove.org/user_avatar/community.podlove.org/joey/32/1080_2.png) [@Joey](https://community.podlove.org/u/Joey)\
**Post date:** [January 1, 2016, 8:09pm UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/1 "2016-01-01T20:09:48Z")

</div>

Hi community

Inspired by the success I had with my archive page, I wanted to add a guests page as well. 😝 The problem is, that `[podlove-episode-contributor-list]` does not return a list when used on a page. I guess it should? The [shortcodes page](http://docs.podlove.org/podlove-publisher/reference/shortcodes.html#contributors) says:

> If used on a non-episode page, it lists all existing contributors with at least one contribution to an episode. Requires “Contributors” module.

The “Contributors” module is activated.

Strangte is, that `[podlove-global-contributor-list]` and `[podlove-podcast-contributor-list]` do return a list just fine.

**My goal is:**  
Showing a list like the one `[podlove-global-contributor-list]` returns, but only for contributors of a certain group or role. The filters/parameters don’t seem to work for `[podlove-global-contributor-list]`, eg. `[podlove-global-contributor-list role="guest"]`.

---

<div class="post-metadata">

**Author:** ![ericteubert](https://community.podlove.org/user_avatar/community.podlove.org/ericteubert/32/1568_2.png) [@ericteubert](https://community.podlove.org/u/ericteubert)\
**Post date:** [January 9, 2016, 7:44am UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/2 "2016-01-09T07:44:57Z")

</div>

> [@Joey](#):
>
> The problem is, that [podlove-episode-contributor-list] does not return a list when used on a page.

This shortcode can _only_ be used on episodes, not pages.

> [@Joey](#):
>
> My goal is:Showing a list like the one [podlove-global-contributor-list] returns, but only for contributors of a certain group or role.

The template for that shortcode is this: [http://docs.podlove.org/podlove-publisher/reference/templates.html#list-of-podcast-contributors](http://docs.podlove.org/podlove-publisher/reference/templates.html#list-of-podcast-contributors). You can copy this and add group/role filters in this line: `{% for contributor in podcast.contributors %}`.  
For example: `{% for contributor in podcast.contributors({role: "guest"}) %}`

---

<div class="post-metadata">

**Author:** ![Joey](https://community.podlove.org/user_avatar/community.podlove.org/joey/32/1080_2.png) [@Joey](https://community.podlove.org/u/Joey)\
**Post date:** [January 9, 2016, 2:20pm UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/3 "2016-01-09T14:20:36Z")

</div>

Thank you for your help!  
I will try creating my own template and post it here for others when I’m done.

> [@ericteubert](#):
>
> This shortcode can _only_ be used on episodes, not pages.

Then[this](http://docs.podlove.org/podlove-publisher/reference/shortcodes.html#contributors) is a bit misleading, if not wrong:

> **If used on a non-episode page** , it lists all existing contributors with at least one contribution to an episode.

---

<div class="post-metadata">

**Author:** ![ericteubert](https://community.podlove.org/user_avatar/community.podlove.org/ericteubert/32/1568_2.png) [@ericteubert](https://community.podlove.org/u/ericteubert)\
**Post date:** [January 17, 2016, 2:41am UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/4 "2016-01-17T02:41:08Z")

</div>

> [@Joey](#):
>
> Then this is a bit misleading, if not wrong

Absolutely, I fixed the documentation. Thanks!

---

<div class="post-metadata">

**Author:** ![Joey](https://community.podlove.org/user_avatar/community.podlove.org/joey/32/1080_2.png) [@Joey](https://community.podlove.org/u/Joey)\
**Post date:** [May 4, 2016, 11:06am UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/5 "2016-05-04T11:06:43Z")

</div>

Hello again!

I’ve worked on a guest list lately. I came up with this:

```
{# @contributors/podcast-contributor-list.twig #}

<table class="podlove-global-contributors">
    {% if option.title %}
        <thead>
            <tr>
                <th colspan="2">{{ option.title }}</th>
            </tr>
        </thead>
    {% endif %}
    <tbody>
        {% for contributor in podcast.contributors({role: "Gast"}) %}
            {% if contributor.visible %}
                <tr>
                    <td rowspan="2" class="avatar-cell" width="60">
                        {{ contributor.image.html({width: 60, height: 60, class: "avatar avatar-" ~ size ~ " photo", alt: "avatar" }) }}
                    </td>
                    <td class="social-cell">
                        <strong class="contributor-name" style="font-family: sans-serif;">{{ contributor.name }}</strong>
                        <div class="social-icons">
                            {% for service in contributor.socialServices %}
                                <a target="_blank" title="{{ service.title }}" href="{{ service.profileUrl }}">
                                    {{
                                        service.image.html({
                                            width: 32, 
                                            class: "podlove-contributor-button",
                                            alt: service.title ~ " Icon"
                                        }) 
                                    }}
                                </a>
                            {% endfor %}
                        </div>
                    </td>
                </tr>
                <tr class="episode-row">
                    <td class="episodes-cell" style="font-family: sans-serif;">
                        <ul>
                        {% for episode in contributor.episodes %}
                            <li>
                                <a href="{{ episode.url }}">{{ episode.title }}</a>
                            </li>
                        {% endfor %}
                        </ul>
                    </td>
                </tr>
            {% endif %}
        {% endfor %}
    </tbody>
</table>

<script type="text/javascript">
(function ($) {
    $(document).ready(function() {
        $(".podlove-global-contributors .episodes-cell").each(function() {
            var items = $("li", this);

            if (items.length > 3) {
                $("li:gt(2)", this).hide();
                $('<span class="show-all-episodes" style="font-size: 85%;"><a href="#">… alle anzeigen</a><span>').insertAfter($("ul", this));
            }
        });

        $(".podlove-global-contributors").on("click", ".show-all-episodes a", function(e) {
            e.preventDefault();

            $(this).closest(".episodes-cell")
                .find("li").show().end()
                .find(".show-all-episodes").hide();
        });
    });
}(jQuery));
</script>

<style type="text/css">
.podlove-global-contributors td {
    vertical-align: top;
    line-height: 1.3em;
}

.podlove-global-contributors .avatar-cell {
    max-width: 100px;
    text-align: center;
}

.podlove-global-contributors td {
    border-top-width: 0px;
}

.podlove-global-contributors .episode-row {
    /*margin-bottom: 10px;*/
}

.podlove-global-contributors td ul {
    margin: 0;
}

.podlove-global-contributors .social-cell li {
    margin: 0;
}

.podlove-global-contributors .social-cell {
    border-bottom-width: 0px;
}

.podlove-global-contributors .episodes-cell {
    padding-top: 0px;
}

.podlove-global-contributors .episodes-cell li {
    display: inline-block;
    margin: 0;
}

.podlove-global-contributors .episodes-cell li a {
    background: #eee;
    padding: 2px 10px;
    line-height: 170%;
    border-radius: 10px;
}

</style>

```

Feel free to copy and improve. Most of it is taken [from here](http://docs.podlove.org/podlove-publisher/reference/templates.html). I’m a total noob when it comes to coding. Therefore I’m sure people will be able to make this better.

I only have **one problem** with that list: The list will not be fully alphabetical. Two of my guests (one named `exe`, the other named `moep0r`) will appear at the bottom of the list.

Why?

---

<div class="post-metadata">

**Author:** ![ericteubert](https://community.podlove.org/user_avatar/community.podlove.org/ericteubert/32/1568_2.png) [@ericteubert](https://community.podlove.org/u/ericteubert)\
**Post date:** [May 5, 2016, 3:23pm UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/6 "2016-05-05T15:23:59Z")

</div>

> [@Joey](#):
>
> I only have one problem with that list: The list will not be fully alphabetical. Two of my guests (one named exe, the other named moep0r) will appear at the bottom of the list.

Could you [file a bug report](https://github.com/podlove/podlove-publisher/issues)? It would be helpful to know what name fields (public, private nick) you have used and what’s in them. Sorting _should_ work based on whatever `{{ contributor.name }}` is.

---

<div class="post-metadata">

**Author:** ![Joey](https://community.podlove.org/user_avatar/community.podlove.org/joey/32/1080_2.png) [@Joey](https://community.podlove.org/u/Joey)\
**Post date:** [May 5, 2016, 10:05pm UTC](https://community.podlove.org/t/podlove-episode-contributor-list-not-returning-a-list/476/7 "2016-05-05T22:05:52Z")

</div>

> [@ericteubert](#):
>
> Could you file a bug report?

[Done](https://github.com/podlove/podlove-publisher/issues/845).
