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

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

iPad Pro Pencil loop

11 Oct 2017

Troika #32: Tearjerker

04 Oct 2017

Instagram Hickstagram

  • 25 Apr 2018

    Haven’t done a sunset in a while, and tonight’s was too good to ignore

  • 23 Apr 2018

    Your birthday pavlova awaits you @hicksleigh!

  • 23 Apr 2018

    A very Happy Birthday to my lovely wife Leigh! We’re keeping the age a secret a though…

  • 18 Apr 2018

    Kind of them to notice!

  • 18 Apr 2018

    A very Happy 20th Anniversary to @hicksleigh! I love you more than ever wifey, and still thank my lucky stars that we met. 😘😍

  • 16 Apr 2018

    If anyone’s interested in buying a nice carbon road bike, I’m selling my Colnago 😉 https://www.ebay.co.uk/itm/Colnago-CLX-3-0-2012-carbon-road-bike-size-54/302705911235

  • 15 Apr 2018

    So pretty!

  • 13 Apr 2018

    Tasty one this

  • 10 Apr 2018

    Replacing worn out MacBook keys. I obviously type ‘a’ a lot

  • 08 Apr 2018

    Grown up Fanta

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