2

I have a problem which should have a simple solution, but I simply can't figure it out. Perhaps I'm overthinking it or missing some piece of information. Being new to drupal it's not unlikely at all.

I'm trying to output a list of links through a View. No matter which Format I chose (unformatted list, grid, etc.), Drupal never fails to add a comma between each link. I'm having a great deal of trouble removing this comma.

Setting a separator under Field Settings have no effect, but I guess that's only applicable if I had another list of links.

I have tried editting 'views-view-field.tpl.php' by adding the line:

<?php $field->field_associated_quicklinks->separator = ""; ?>

But it doesn't seem to work. PHP and I aren't on friendly terms, so I'm loathe to start messing too much with the scripts - unless I got some helpful tips from you guys.

All in all I'm stuck on this, and frustrated that I'm having this problem in the first place. Drupal shouldn't go around adding content to my output.

------ EDIT: Well, after several hours and a few tufts of hair, I found this great vid: http://www.youtube.com/watch?v=sxZQqgvJk3s
I believe it's exactly what I needed to know, but I still can't make it work.

I did as prescriped:
1) Copied the field.tpl.php file, removed the comment and changed the mark-up a bit.
2) I named the file 'field--field_associated_links.tpl.php' and copied it into the templates folder of my sub-theme.

I get no reaction whatsoever. Could it be confused by the fact that my field name starts with 'field' as well?

Any and all suggestions are very welcome!

0

1 Answer 1

3

Normally you can control this separator directly in the views field option in the multiple field settings. Multiple field settings Have you tried to change this ?

2
  • My Saviour! I -knew- I was missing something very basic, and this was it. Can't believe I spend the whole darn day on this, only to learn I had to uncheck a box. Well, on the plus side, I now know a lot more about overriding fields and views now. Thanks so much tostinni, you really did save my day! :-)
    – Tobias
    Nov 25, 2012 at 19:13
  • PS: The override for the field as mentioned in the edit did actually work, but only for the output to the page itself - not when rendered through the view. I spend the last hour or so trying to override that.
    – Tobias
    Nov 25, 2012 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.