Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i created a small patch which allows to add a remove link, for example at a views table without extra theming
Comment | File | Size | Author |
---|---|---|---|
#3 | favourte_nodes_add_remove_link.patch | 2.87 KB | dawehner |
#2 | favourte_nodes_add_remove_link.patch | 1.32 KB | dawehner |
#1 | favourte_nodes_add_remove_link.patch | 1.66 KB | dawehner |
favourte_nodes_add_remove_link.patch | 896 bytes | dawehner |
Comments
Comment #1
dawehneradded a remove/add field, which displays add to favourite if its not a favorite yet
Comment #2
dawehnerthis is really working version!!
Comment #3
dawehnersome more features:
select wether to return to view or to userprofile
Comment #4
kbahey CreditAttribution: kbahey commented- "favouite" is mispelled and inconsistent.
- Patch does not apply on current DRUPAL-5 tag
Hunk #1 FAILED at 554.
Hunk #2 FAILED at 663.
2 out of 2 hunks FAILED -- saving rejects to file favorite_nodes.module.rej
Comment #5
itsGOTtobegroovy CreditAttribution: itsGOTtobegroovy commentedNo need for a patch or extra theming. Here's what to do:
For the My Favorites page, go to Views"
Add field Node:nid
Check the box for "Output this field as a link"
In the box, put: favorite_nodes/delete/[nid]
You can check the box "Rewrite output for this field" in order to create your own link text. I used "Remove from favorites"
I figured this out by hovering over the "remove from favorites" link in the node view to see what URL was generated.
Comment #6
itsGOTtobegroovy CreditAttribution: itsGOTtobegroovy commentedForgot to mention that favorite_nodes/delete/[nid] should go in the Link Path field
Comment #7
itsGOTtobegroovy CreditAttribution: itsGOTtobegroovy commented