Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-03-19 06:04:36

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Using linklist for creating a list of sources/bibliography

I rarely use links and linklist, but in my current design I needed a bibliography and linklist turned out to be a perfect solution.

By entering my list of books into links and using linklist, I can quickly and easily change the layout. Instead of having to change each entry of an article (or multiple articles), I just change the layout of the link form.

It also alphabetizes automatically, so prevents me from making a stupid mistake.

And I can also easily sort the list by publication date if I want to.

This would be helpful for other lists as well, like a list of contributors for example.

Perhaps, you’ll find this explanation helpful for one of your own projects:

This is what the bibliography list looks like:

The entries in links:

  • Notice that for the date I have used the date that the book was published. In case I want to sort the list by publication date, I just add sort by date to my Textpattern tag.

An individual entry in links:

  • Notice that it contains textile.
  • This particular entry contains no link. But a link is fine, too.

I created a link form named “sources” with the following code:

<txp:evaluate test="link_url">
    <a rel="external" href="<txp:link_url />" target="_blank"><txp:link_name /></a>
<txp:else />
    <txp:link_name />
</txp:evaluate>
<txp:link_description escape="tidy, textile" />

  • This code checks if there is a link. If there is a link, the author’s name is linked in my example. If there is no link, no anchor html is added. But you could also add a linked link symbol to the end of the entry instead.
  • escape="tidy, textile" activates textile, allowing you to format your entries.

On the “Bibliography” page I used this Textpattern tag:

<txp:linklist form="sources" category="sources" sort="linkname" wraptag="ul" break="li" class="" />

You could also add a list to an individual article and use different link categories for different articles.

Note

To clarify, I am not using this for notes, but for a bibliography (recommended reading).

Do let me know if I should not use links this way!

Last edited by Kjeld (2021-03-20 02:38:02)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#2 2021-03-19 07:47:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Using linklist for creating a list of sources/bibliography

I love the possibilities of linklist and I’ve been using it extensively, and perhaps heretically, for a number of different purposes including loading random videos.

The only issue is that linklist items are not included in the search.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2021-03-19 08:13:14

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: Using linklist for creating a list of sources/bibliography

colak wrote #329350:

I love the possibilities of linklist and I’ve been using it extensively, and perhaps heretically, for a number of different purposes including loading random videos.

The only issue is that linklist items are not included in the search.

Oh, that is an important point!

And I see that wet_haystack (if it still works in the most recent Textpattern version) does not offer an option to index the link column…

I love your random vimeo and quote solutions!

Last edited by Kjeld (2021-03-19 08:15:58)


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#4 2021-03-19 08:38:19

etc
Developer
Registered: 2010-11-11
Posts: 5,194
Website GitHub

Re: Using linklist for creating a list of sources/bibliography

colak wrote #329350:

The only issue is that linklist items are not included in the search.

Kjeld wrote #329352:

Oh, that is an important point!

and yet another reason to merge all content types is cf branch.

Offline

#5 2021-03-19 08:47:10

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Using linklist for creating a list of sources/bibliography

etc wrote #329353:

and yet another reason to merge all content types is cf branch.

👍


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#6 2021-03-19 09:13:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Using linklist for creating a list of sources/bibliography

That is indeed a cool use of link lists; an under-appreciated feature of Textpattern, imo.

I’ve just done something similar using links to create a tree of online manuals for an organisation. By creating a category tree under a single parent and some tag magic I can output sets of manuals by category. The journey is documented for anyone who wants to use something similar.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#7 2021-03-19 09:34:52

etc
Developer
Registered: 2010-11-11
Posts: 5,194
Website GitHub

Re: Using linklist for creating a list of sources/bibliography

Bloke wrote #329357:

The journey is documented for anyone who wants to use something similar.

BTW, have you tried 4.8.5 breakby/breakform powers?

Offline

#8 2021-03-19 09:45:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

Re: Using linklist for creating a list of sources/bibliography

etc wrote #329359:

BTW, have you tried 4.8.5 breakby/breakform powers?

Yes!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

#9 2021-03-19 10:18:49

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: Using linklist for creating a list of sources/bibliography

Bloke wrote #329357:

The journey is documented for anyone who wants to use something similar.

Fascinating. Thanks for sharing.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

Board footer

Powered by FluxBB