Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#401 2018-03-18 00:15:12

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

Another one of my simple questions, pardon me, please!

If i look for multiple tags, like tag1+tag2 i get results displayed individually for each tag in different lists.
How can i only display the articles containing all tags in one list?
Only to see the crossreferencing results?

Thank you.

Last edited by jayrope (2018-03-18 00:16:03)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#402 2018-03-18 12:00:32

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

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

jayrope wrote #310097:

How can i only display the articles containing all tags in one list?

On your tag list / filter landing page, use <txp:smd_related_tags section="your-section-here" /> without any surrounding <txp:smd_tag_list>.

Reason: the smd_tag_list tag will iterate over all the tags and show you articles with each tag individually, so if you want to see the combined results, don’t iterate!


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

#403 2018-03-18 20:51:08

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

That does work.
Minor drawbacks are, that count and tag name are only shown in the results list, when smd_related_tags is enclosing.


a hole turned upside down is a dome, when there’s also gravity.

Offline

#404 2018-03-18 21:31:40

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

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

jayrope wrote #310115:

Minor drawbacks are, that count and tag name are only shown in the results list, when smd_related_tags is enclosing.

Not sure I understand, sorry. What are you trying to display about the articles that match?


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

#405 2018-03-18 21:44:04

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

I noticed, that when smd_related_tags is not enclosing i cannot use smd_tag_count or smd_tag_name to show to the searcher, what they have searched for and how many there are. Both need to be enclosed by smd_related_tags to work.


a hole turned upside down is a dome, when there’s also gravity.

Offline

#406 2018-03-19 11:03:30

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

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

jayrope wrote #310117:

I noticed, that when smd_related_tags is not enclosing i cannot use smd_tag_count or smd_tag_name to show to the searcher, what they have searched for and how many there are. Both need to be enclosed by smd_related_tags to work.

Can you post a snippet of your template code so I can take a look please? It works in my tests but maybe I’m not doing it the same as you.

Incidentally I’ve just pushed a change to the 4.7.0 branch of the plugin on GitHub that permits you to check the search_mode. Example:

<txp:smd_if_tag search_mode="and">
  <h2>Articles matching selected tags</h2>
  <txp:smd_related_tags section="articles" wraptag="ul" break="li" />
    Show <a href="<txp:site_url /><txp:section />">all tags</a>.
<txp:else />
  <!-- Articles matching each tag in turn -->
  <txp:smd_if_tag_list>
    <txp:smd_tag_list>
      Other articles with tag <txp:smd_tag_name title="1" link="1" />
      <txp:smd_tag_count />
      <txp:smd_related_tags section="articles" wraptag="ul" break="li" />
    </txp:smd_tag_list>
    Show <a href="<txp:site_url /><txp:section />">all tags</a>.
  <txp:else />
    <h2>All tags</h2>
    <txp:smd_tag_list showall="1">
      <txp:smd_tag_name title="1" link="1" />
      <txp:smd_tag_count />
    </txp:smd_tag_list>
  </txp:smd_if_tag_list>
</txp:smd_if_tag>

Options for the search_mode attribute are:

  • andURL uses the AND tag combinator defined in prefs
  • orURL uses the OR tag combinator defined in prefs
  • singleURL only represents a single tag

EDIT: and remember, from 4.7.0, you can use the core attribute not:

<txp:smd_if_tag not search_mode="single">
   // URL uses either an OR combinator or an AND combinator 
</txp:smd_if_tag>

Last edited by Bloke (2018-03-19 11:25:59)


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

#407 2018-05-27 19:01:44

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

After updating to Textpattern 4.7 (and accordingly smd_tags to 0.60) the smd_tag landing section only shows an error 404. The section is called “filter” (it does exist) and formerly showed a tree of all used tags with counts before. Is there any simple idea, why this could have changed?

Last edited by jayrope (2018-05-27 19:03:30)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#408 2018-05-28 21:39:21

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

Okay, adding to my last post i found out, that for some weird reason, the landing section mentioned in the URL_management prefs for smd_tags results is replaced by the error_default page.
I can’t see why this happens, overview in sections tells me all is good.

EDIT: Any section i unlist from the list of trigger sections has the 404 disappear, and displays that section properly again.

But obviously the form containing smd related tags on the page doesn’t display anything then. A <txp:else /> no tag list in the end of that form at least properly returns “no tag list”.

I can’t see any further and hope a TXP 4.7.1 version will just correct that error… (?).

Last edited by jayrope (2018-05-31 12:00:51)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#409 2018-06-03 18:32:56

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

I now made a fresh test installation of TXP 4.7 with smd_tags 0.6 – the error does NOT appear with the test install. However, while comparing my updated version with the fresh install only reveals, that
the updated version didn’t have four-point-seven installed at first.
.htaccess files are the same.
Even when disabling all plugins but smd_tags, the error on the updated version is persistent.

Last edited by jayrope (2018-06-03 18:33:40)


a hole turned upside down is a dome, when there’s also gravity.

Offline

#410 2018-06-06 18:12:39

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 651
Website

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

Stef, is there a way to get a hold of you to discuss this?

Thanx much!


a hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB