Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2020-10-24 20:51:23

Bruce Bowden
Member
From: Melbourne, Australia
Registered: 2020-10-22
Posts: 28

Re: Adding file links to articles

I may not have been clear in what I was trying to achieve. I just need a list of files where the file tags match both (all?) the article tags.

Basically I need <txp:smd_related_tags type=“file”>, but showing only files that have all tags in common with the article, not just any tag.

I’m not sure how the URL management code you described can achieve this.

Stay safe
Bruce

Offline

#14 2020-10-25 08:35:39

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

Re: Adding file links to articles

Hi Bruce, it is still unclear to me as to what you are trying to achieve, so here come some questions.

  1. Are you trying to include download links to your files in your articles?
  2. Is each meeting documented by one article and many files?
  3. Is each meeting documented by more than one article and many files?
  4. Do you have another section or article where those file lists need to be generated and downloaded from?

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

Offline

#15 2020-10-25 08:59:49

Bruce Bowden
Member
From: Melbourne, Australia
Registered: 2020-10-22
Posts: 28

Re: Adding file links to articles

Hi Yiannis and Stef,
Don’t worry too much about this. I think I am trying to run before I can walk. You guys have offered workable solutions. I will use those and get on with learning more about Textpattern.

To answer Yiannis’ questions: Each meeting is a single article with multiple files. I am looking for the easiest way to manage it as there is a bit of historical stuff to upload. Loading all the files through the admin screens, then assigning a couple of tags to each one, is very quick and would be a nice way to manage it but probably overly optimistic at my level of skill.

First step for me now should be finishing all the other parts of the design process, then I can come back armed with a bit of actual knowledge.

I’ll document any eventual solution here in case it’s more than just a strange edge case.

Stay safe
Bruce

Offline

#16 2020-10-25 10:19:44

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

Re: Adding file links to articles

Sorry for misinterpreting your requirements. Since smd_related_tags is generally designed for lists that are driven from tags in the URL, it isn’t wired to directly handle tag logic from article content.

It might be possible to add an attribute that could switch between any/all tag matches when cross-matching. Not sure how that would work if it was used in a URL context as well. Will need to give it some thought.


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

Offline

Board footer

Powered by FluxBB