By sp09 on
How can I create a latest tags box that sorts the latest and filters duplicates? I've been trying it with views but it's not working.
How can I create a latest tags box that sorts the latest and filters duplicates? I've been trying it with views but it's not working.
Comments
=-=
Thinking about this a bit.... Taxononmy aren't nodes. Therefore I'm not sure the required information will be present where it concerns when the terms were created. Thus filtering latest may be a bit difficult unless they are turned into nodes. the category.module does this I think. It's been awhile since I've used it though and wasn't crazy about the implementation.
me too I'm not to big on it
me too I'm not to big on it but I know it's very popular with content sites I want to fill up more space on my front page. I'll check out the category mod to see if it can get the job done, I'm not to big on working with php
=-=
I'd test the snippet below before I went after the category module.
Recent Tags
I had to do this recently and could not come up with a way in views to do this. I did do it as a block with PHP (you must have php available as a filter). It was in a hurry and should be tested somewhat but works for what I needed at the time.
change the 10 depending on how many you want displayed. The group by will get rid of duplicates
where do I place this code?
where do I place this code?
=-=
in a new block administer -> blocks -> add block
with the php input format provided by the core phpfilter.module
Though personally, I would test it in a page content type with the php input format to ensure that it works first. Bad php in a block can break the site at which point you would have to manually manipulate the database to turn the offending block off.
how do I create a php format
how do I create a php format in format input?
=-=
you don't. you switch to it.
enable the phpfilter.module in administer -> modules
when creating a block, click on the "input formats" link under the body text area.
choose php format as you would with any other input format.
create a new block
blocks add a block place it in the block body. Set the input format to PHP code. Then from the block overview page place it where you want it to appear
Ok I've got it set up and
Ok I've got it set up and it's working perfect. I added more tag results (25) and I took away the Recent Tags title but gave the same title as the block title for a better look. No duplicates no problems, thanks a lot matt I appreciate it and to you too vmu.
Testing that sql on another
Testing that sql on another site seems to not quite be right. Some just use tags not in the list and some not used in a while where in the list.
Now using this and testing so far seems correct
How can I set it to show
How can I set it to show random tags?