Cloud Term Links
Drupalone - February 10, 2009 - 10:31
| Project: | Views Cloud |
| Version: | 6.x-1.0 |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I managed to get a working view Block with all Terms Of my Page as a cloud, but can't configure the links on the Terms.
They look something like: mypage.de/cloud/myTerm
But I want them to just link to the standard Term Page. Does somebody now how to do that? I dont get, where this cloud links are generated...

#1
The Answaer was simple:
alter views-cloud-summary-style.tpl.php like this:
old:
<a href="<?php print $row->url; ?>"><?php print $row->link; ?></a>new:
<a href="<?php print $row->id; ?>"><?php print $row->link; ?></a>But I still ask myself if there should'nt be a way to manage this thrue the interface... or is there one that I haven't found yet?
#2
ok, i just found out, I wrote complete nonsens. It doesn't help, its a mistake...
So my problem is still existing.. :-(
#3
This is it, at the end:
<a href="<?php print url('taxonomy/term/'.$row->term_node_tid); ?>"><?php print $row->link; ?></a>:-) have fun!
#4
maybe i didn't understand what you were meaning, but using the attached view, every time i click on a tag on the cloud, i get to a page with a list of the nodes with that tag, sorted by date.
you can obviously change the sort order.
hope it helps.
#5
This takes me to the mypage.com/taxonomy/term/ and not mypage.com/taxonomy/term/1
#6
I have the same issue.
Whenever I click the term in a cloud, it gets me to /cloud/term%20name . By common logic, the term should be linked to its taxonomy/term/tid page or its alias such as /termalias .
#3 doesn't help at all -- all terms in a cloud get linked to tid of the first term in the list.
#7
same problem here
#8
same problem
#9
@serge.chepurko : #3 does work, I confirm. What Drupalone meant was replacing line 17
<a href="<?php print $row->url; ?>"><?php print $row->link; ?></a>with<a href="<?php print url('taxonomy/term/'.$row->term_node_tid); ?>"><?php print $row->link; ?></a>, not adding it at the end of the file.You'd better use that line instead :
<?php print l($row->link, 'taxonomy/term/'.$row->term_node_tid, $options = array('attributes' => array('alt' => 'See all pages related to '.$row->link.''))) ?>That's basically the same, but let the urls go through Drupal's handling mechanism, meaning that aliases and links output will work correctly.
By the way, I guess the proper way to do that should be by using the bunch of options, in the "Field" options of Views, that state "Rewrite the output of this field", "Output this field as a link", "Trim this field to a maximum length", "Link this field to...", etc. Unfortunately, they seem to have no effect when the style is set "cloud", so I guess the module is bypassing these ???
[edit]I forgot to mention : of course don't touch the views-cloud-summary-style.tpl.php of the module directly. Copy it to your theme's folder and make the changes there. (Don't forget to empty the cache)[/edit]
#10
thanks a lot ...
... i'm in a hurry and had only short time to test - but is it possible, that $row->term_node_tid is empty?
#11
@#9
it's not working - is something missing in my view? if i want to print it: $row->term_node_tid it's empty ...
#12
@#9: did you test it? does it work for you?
#13
ok - i now use taxonomy id as argument - it's working :)
but no node code anymore ...
thanks momper
#14