How to setup a Textpattern playlist

18 Mar 2007

There was once a time when my most-asked-question was “can you send me the Firefox logo vector originals please”. Nowadays, it’s “How did you do the playlist bit – is it a plugin?”. So to save repeating myself, I’m writing this up as a blog post.

First of all, I’m afraid it isn’t a plugin. While there are ways of using the Amazon API to pull out album cover images automatically, I’ve had mixed results. Sometimes its wrong, and sometimes it doesn’t stock the album., which as an anal cover fetishist, just isn’t acceptable.

So, before I go further, bear in mind that with Textpattern, you can add anything, and send to anywhere, and display it how you like it. While not completely automated, my system does at least allow me to update the playlist fairly quickly.

Here are the steps if you want to try to setting one up yourself:

  1. Create a new custom field called “Amazon URL”. This is used to store the link (My own setup is slightly different as it uses the ASIN instead)
  2. Create a new section called ‘Playlist’. Turn all the radio button options to ‘no’. This will give us a specific section to post to.
  3. Create an ‘article’ form called ‘covers’, and add the following:
    <li><a href="<txp:custom_field name="Amazon URL" />" title="<txp:title />">
          <txp:article_image />
    </a></li>
  4. In your page template, where you want the playlist to appear, add the following:
    <ul>
    <txp:article_custom form="covers" limit="9" section="playlist" sortby="Posted" sortdir="desc" />
    </ul>

    The article_custom tag is the key here. It isn’t context-sensitive like <txp:article /> and allows you to output content from a different section anywhere you like.

Then I add the content. So being the aforementioned anal cover fetishist, I upload these manually via Content > Images. I then take a mental note of the image ID, go to the write tab, and enter this number in the ‘article image’ field.

Then all that needs to be done is add the Title, and choose the correct section. Done!

Recent Posts

It’s just fashion

26 Jun 2018

The Symbol Sourcebook

08 Jun 2018

Differences between Icon and Logo Design on This is HCD Podcast

10 Apr 2018

Twelve South PencilSnap

01 Apr 2018

The Infinite Canvas

09 Feb 2018

Blade Runner 2049

14 Oct 2017

Instagram Hickstagram

  • 14 Jul 2018

    Stopping for a breather - hot day for hills

  • 13 Jul 2018

  • 09 Jul 2018

    Recent garden addition: Stargazer Lillies

  • 07 Jul 2018

    Well… we missed quite a few key acts, but have made it here before Interpol starts at least!

  • 07 Jul 2018

    On our way to BST in Hyde Park. Or… not 😞

  • 06 Jul 2018

    My favourites from this years On Form Sculpture exhibition. The whale was my absolute favourite, but was already sold (which is fine as I don’t have a spare £11,000)

  • 01 Jul 2018

  • 01 Jul 2018

    Not quite in height order. Sort it out

  • 01 Jul 2018

    Filth.

  • 30 Jun 2018

    Agapanthus about to burst forth

Contact us

Call Jon on +44 (0)7917 391536, email or tweet @hicksdesign.

Alternatively, pop in for tea and cake at the studio…

Hicks
Wenrisc House
Meadow Court
Witney, OX28 6ER
United Kingdom