Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#471 2020-05-11 22:00:33

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 21

Re: smd_tags: unlimited article, image, file and link taxonomy

@Bloke

Thank You so so much for Your help and detailed explanation :) ! And Your quick reply, thanks to which I am again able to further design my website on TextPattern.

I’ve tried Your advice one by one. What has helped was:

> Change the plugin load order from 5 to 4 in the Admin->Plugins panel.

+ one additional step: change “Article URL pattern” from “/title” to “/section/title”. Now everything seems to be working well!

Offline

#472 2020-05-11 22:18:23

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

ThomasLeigh wrote #322921:

Now everything seems to be working well!

Excellent. Glad you can carry on until such time as we fix this. Thank you for using Textpattern and I hope it serves you well.


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

#473 2020-05-31 10:05:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Right, let’s try this again.

smd_tags v0.8.0 is released and this should should SHOULD fix the issues with 404son tag lists. There may be a better way for me to handle the URL manager given Oleg’s recent changes to core that we snuck into 4.8.1, but I’ll see about that over the coming weeks.

Thank you for your patience while we hammered this out.


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

#474 2020-06-02 16:01:53

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 21

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke wrote #323446:

“smd_tags v0.8.0 (…) Thank you for your patience while we hammered this out.

Thank You, I’ve successfully upgraded the plugin, changed the URL scheme into /title and it still works fine.

I just wonder whether is possible not to include “article”, “image”, etc. within links generated by the plugin?

Offline

#475 2020-06-02 23:39:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

ThomasLeigh wrote #323505:

possible not to include “article”, “image”, etc. within links generated by the plugin?

Glad it’s working okay now.

With regards the tag type, the answer is… partially, yes. Instead of using, say:

<txp:smd_if_tag>
   <txp:smd_tag_list>
      <txp:smd_tag_name title link />
   </txp:smd_tag_list>
</txp:smd_if_tag>

You can instead build the links manually for article types only:

<txp:smd_if_tag>
   <txp:smd_tag_list>
      <a href="<txp:site_url />tags/<txp:smd_tag_name />"><txp:smd_tag_name title /></a>
   </txp:smd_tag_list>
</txp:smd_if_tag>

One caveat is the destination section (tags in this case) is hard-coded in the URL. So if you alter your smd_tags prefs to a different trigger section in future, that won’t automatically be reflected in your URLs.

Secondly, this only works for articles because they’re considered ‘default’ and are thus internally represented via the shortcut URL syntax without type designator. All other types must have a designator, for disambiguation.


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

#476 2020-06-03 14:29:28

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 21

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke wrote #323516:

You can instead build the links manually for article types only:

Thank You. It works with single-word tags, but in other cases it fails. For example I have a tag “how-to” (tag title “how to”, tag name “how-to”). With standard code the generated link is:

https://trailofthelight.xyz/tags/article/how-to

(it looks the same on the bottom bar while the cursor is hovering over the link)

With the workaround the link is:

https://trailofthelight.xyz/tags/how%20to

(it looks differently on the bottom bar while the cursor is hovering over the link:

https://trailofthelight.xyz/tags/how to

)

As a result tags which have more than one word do not work, due to wrong links.

Offline

#477 2020-06-03 14:35:06

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

ThomasLeigh wrote #323532:

tags which have more than one word do not work, due to wrong links.

That’s weird because <txp:smd_tag_name /> returns the name and <txp:smd_tag_name title /> returns the title. So as long as you use the correct tag format in the anchor, it should return your hyphenated tags for use in the URL.


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

#478 2020-06-03 14:44:18

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 21

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke wrote #323534:

That’s weird because <txp:smd_tag_name /> returns the name and <txp:smd_tag_name title /> returns the title. So as long as you use the correct tag format in the anchor, it should return your hyphenated tags for use in the URL.

I am also surprised. My code is:

<x style='font-size:<txp:smd_tag_info item="weight" />%;'><a href="<txp:site_url />tags/<txp:smd_tag_name />"><txp:smd_tag_name title /></a></x>

My tag from the admin panel: tag title: “how to”, tag name: “how-to”.

I performed a little experiment – I put this within tag cloud code:

title: <txp:smd_tag_name title />
name: <txp:smd_tag_name />

and it results in this:

title: how to name: how to

Offline

#479 2020-06-03 14:47:52

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Bizarre. That’s not what it does on my site. I get “how to” and “how-to”.

*scratches head*

Out of curiosity, what happens if you force the title attribute to be zero?

title: <txp:smd_tag_name title />
name: <txp:smd_tag_name title="0" />

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

#480 2020-06-03 14:53:54

ThomasLeigh
Member
Registered: 2020-05-11
Posts: 21

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke wrote #323540:

Out of curiosity, what happens if you force the title attribute to be zero?

title: <txp:smd_tag_name title />...

title: how to name: how-to

So it works now :) Thank You very much! :)

Last edited by ThomasLeigh (2020-06-03 14:54:10)

Offline

Board footer

Powered by FluxBB