Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#265 2013-11-29 21:46:47
Re: smd_tags: unlimited article, image, file and link taxonomy
giz
Don’t think you’re missing anything. I just did what you described (at least I think I did: correct me if I’m wrong) and here’s what happened. Let me know if it differs to what you see, because it seems to work in both places for me:
- Set Section Articles to use default Page template.
- Write article 1 in Section Articles, pick a category and choose one tag from the list (because I have cat->tag mapping on).
- Write article 2 in Section Articles, pick same category and same tag.
- In my default Page template, add
<txp:article> <h2><txp:permlink><txp:title /></txp:permlink></h2> Related: <txp:smd_related_tags /> </txp:article>
- View site
On site.com/articles I see:
<h2>Article 1</h2>
Related: Article 2
<h2>Article 2</h2>
Related: Article 1
And if I click on any of the 4 links I see an individual article at site.com/articles/article-1, something like this:
<h2>Article 1</h2>
Related: Article 2
It seems to be the complete inverse of yours, but it’s doing what I’d expect. In other words, on a list page, show the list of articles in the section and display the title and related articles of each. Then when you go to individual article context, show only one (individual) article and the related articles from that one.
If yours is doing the opposite, that’s very odd. Unless you have a typo or unclosed tag somewhere, I’d expect it to behave properly, If you temporarily strip your page back to bare bones, does it behave then (without smd_related_tags)? And does it work in its bare bones form if you then add <txp:smd_related_tags />
back in? Can you then add tags back in chunk by chunk to see at what stage it stops working?
Last edited by Bloke (2013-11-29 21:48:53)
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
#266 2013-11-29 23:04:26
Re: smd_tags: unlimited article, image, file and link taxonomy
Thanks, Bloke
I’m doing all this on a bare-bones default page (and it behaves itself without smd_related_tags
inserted).
- Set Section Articles to use default Page template. check
- Write article 1 in Section Articles, pick a category and choose one tag from the list (because I have cat->tag mapping on).
I want cat->tag mapping off, but for the experiment I set it to on / set my tag ‘s Linked cat field to ‘Hope for the Future’. check - Write article 2 in Section Articles, pick same category and same tag. check
- In my default Page template, add <txp:article> <h2><txp:permlink><txp:title /></txp:permlink></h2> Related: <txp:smd_related_tags /> </txp:article> check: no dumb typos!
On site.com/articles I see:
<h2>Article 1</h2>
Related:
<h2>Article 2</h2>
Related:
And site.com/articles/article-1 it works as expected:
<h2>Article 1</h2>
Related: Article 2
.
Wot the?
Everything else appears to be working fine. TXP diagnostics are sweet.
I can do this, but I’d rather not:
<txp:article>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
Related: <txp:smd_tag_list><txp:smd_tag_name link="1" /></txp:smd_tag_list>
</txp:article>
and I get:
<h2>Article 1</h2>
Related: <a href="mysite.com/articles/article/tag-a">Tag A</a>
<h2>Article 2</h2>
Related: <a href="mysite.com/articles/article/tag-a">Tag A</a>
(You’ll notice that I’m using articles,smd_tags as my Trigger(s) for tag lists
field).
Any suggestions as to what I should poke my debug stick at?
Last edited by giz (2013-11-29 23:08:06)
Offline
#267 2013-11-30 22:19:25
Re: smd_tags: unlimited article, image, file and link taxonomy
Stef kindly had a look at my TXP installation and figured out what was wrong:
bloke wrote:
It is indeed down to the way you’re using it on the front page. I
forgot that the smd_related_tags “section” attribute defaults to “the
current section”. On the home page, there is no section, so you need
to tell the tag which section your articles are in. It’s not very good
at guessing :-)
You can either hard-code it, or get the current article’s section like this:
<txp:smd_related_tags section='<txp:section />' />
That did the trick!
Thank you Stef, both for your amazingly useful plugins and your untiring dedication in fielding all these questions.
Offline
#268 2014-01-22 22:34:05
- saccade
- Plugin Author
- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi all
Great plugin and very useful, but on a 4.5.5/0.50-install I ran into problem yesterday:
On my normal pages there is a smd_tags_list working fine showing all tags as a way of navigation.
On a tag landing page I first have a conditional like this
<txp:smd_if_tag_list> <txp:smd_tag_list wraptag=”“ break=”“> <h2><txp:smd_tag_name title=“1” />:</h2> <txp:smd_related_tags wraptag=“ul” break=”“ section=”“ >
<li class=“clearfix”><h3><txp:permlink><txp:title /></txp:permlink></h3> <txp:sac_article_thumbnail type=“Thumbnail” link=“artikelbild” class=“align-left” />
<txp:if_excerpt><txp:excerpt /><txp:else /><txp:body /></txp:if_excerpt></li>
</txp:smd_related_tags> </txp:smd_tag_list>
</txp:smd_if_tag_list>
- which does nicely what it should: Show the tag name and list all articles related –
then an smd_tags_list is following as on my normal pages – which now only lists the one tag called (this may be intended).
So far I had only the problem how to get the later smd_tags_list to list all tags, not only the one which the landing page was called with
But now I tried another thing and behaviour got strange:
I tried to set the full smd_tags_list before the smd_related_tags-list.
Now it shows indeed all tags (different from the use after smd_related_tags)
but
the above cited smd_related_tags-result is affected by this: It now doesn’t list solely the tag which the landing page was fetched with, but it lists ALL tags as h4 – though only the called tag with articles related
and the following (I didn’t delete it for I was testing the whole thing) smd_tags_list didn’t show only the one tag called (as so far), but also lists all tags now.
So, does smd_tags_list modify what is seen by smd_related_tags?
Is there a workaround?
best regards
Offline
#269 2014-05-22 12:20:31
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi, I dont understand how setup a tag list non context dependant. I want in my sidebar a list with all my articles tags …
Offline
#270 2014-05-23 08:17:36
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_tags: unlimited article, image, file and link taxonomy
Solution : smd_query do the job with a little SQL select.
Offline
#271 2014-08-05 06:01:24
- saccade
- Plugin Author
- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi,
on a 4.5.5 install when managing tags the linked cat list is behaving weird:
Sometimes it lists correctly when there is a cat linked to the tag, but sometimes it doesn’t.
It obviously sometimes correctly fetches the linked cat when pressing the “Aktualisieren”-button,
but sometimes deletes the linked cat in the same way.
Also linked cat doesn’t appear regularly when creating a new tag.
So it’s a real cat ;)
Did I miss something here about linked cats?
Offline
#272 2014-08-09 17:28:40
Re: smd_tags: unlimited article, image, file and link taxonomy
saccade wrote #282648:
Did I miss something here about linked cats?
Unlikely! It could be a botched implementation. Do your cats have non-ascii characters in them perchance? Umlauts maybe? Might just be that at a stab in the dark.
If you can give me some examples of your setup (cat hierarchy, names, labels, etc, and a few tag names you’re trying to associate with the cats in question) I’ll try and replicate it when I can and see if I can isolate the cause.
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
#273 2014-08-09 17:54:09
- saccade
- Plugin Author
- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: smd_tags: unlimited article, image, file and link taxonomy
The cat in question (only one so far for the tags, but there are more) is: schwerpunktdekanat-2014-freising
no umlauts and everything strictly ascii
- allershausen
- au
- dorfen-taufkirchen
- eching
- erding
- freising
- markt-schwaben
- moosburg
- neufahrn
- poing
no umlauts as well and even strictly ascii.
There are some single situations when I get the linked cat as a field, but even it doesn’t appear when I use the “manage tags” tab for the first time after logging in. Mostly I think the field appears when I hit create with noting in the fields before.
But even when I activate one of the already existent and (manually!9 linked tags the field doesn’t appear – and the link will be deleted when I save any change.
Just double checked everything: There is one category with an umlaut, not used here, but I’ll delete it now to see if things change. Edit checked that, but no influence. “linked cat” still missing.
To be exact: The label “linked cat” is present, but theres no selection nor any field in it.
Last edited by saccade (2014-08-09 17:56:03)
Offline
#274 2014-08-11 07:49:57
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_tags: unlimited article, image, file and link taxonomy
I’m building a new version of a site with smd_tags. I want to import the category structure of the old site in smd_tags.
I have imported the category table of the old site in the new site.
It seems impossible to import categories in smd_tags if no articles are linked to categories … Right ?
Offline
#275 2014-08-22 10:12:20
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi
I marched through all 28 pages but could not find a simple solution! Maybe overlooked it though…
I have an alphabetic tag list in a right sidebar. More or less the same code as from your example 3 from the tag info page, but without the weighted font-size class. The resulting linear vertical list shows the letters of the alphabet followed by the tag names.
When clicking a tag name the articles with that tag are shown in the main part of the page. What is the easiest way to highlight the clicked tag in the list when the articles with that tag are shown?
thanks
Kees
Offline
#276 2014-09-02 01:41:10
Re: smd_tags: unlimited article, image, file and link taxonomy
Bloke – is it possible to tag users/authors with smd_tags?
Thanks,
Mike
Offline