| Project: | Token |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hey all,
I am building a photo gallery based on the tutorial of Jeff Eaton. This is all going great, however, in the album list that always shows the latest image in the album, I wanted to link that image to the album content. (same what the title does already). For this reason I wanted to show a normal image thumbnail and give this a link. Thank to the node_reference module I could already link photo-nodes to gallery-nodes. This gives me a simple functionality with %1 to add the album name in the link field. But this gives the unformatted album title that will never link to my album nodes because i used pathauto to give them a specific path. For example the names in the url are all transformed to lowercase and the spaces are transformed into - 's. It would be so awesome if I could use the same tokens as I used for the node url's.
You can find an example of this here.
Maybe there is another way for this? Any feedback is highly appreciated.
Cheers,
Danny
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| views-replacement-patterns2.png | 126.36 KB | Ignored: Check issue status. | None | None |
Comments
#1
Same question in the Post Installation forum. With some response.
http://drupal.org/node/518808
Cheers,
Danny
#2
Cause I posted this issue 3 months ago, it might be a good time to bump this up.
#3
http://drupal.org/node/483036#comment-1682916
#4
I'm building another website where I want to use this functionality. Any developments in this?
Cheers,
Danny
#5
Today I found the solution using "relationships".
1. add the 'node reference' as a Relationship.
2. add a Node ID in Fields.
3. In this field you can select "node reference" from a dropdown, because it is set in Relationships. Select it.
4. check "exclude from display"
5. In your image-field, set output as normal/imagecache image. Just don't set it as "link to node".
6 Check "display as link" and as link fill out: "node/[nid]". This [nid] will be the node Id of the referenced gallery node.
7. Save. That's it!
An image example in the attachment.
Hope this is helpful for others as well.
Cheers,
Danny
#6
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
I have used Views Custom Field and PHP code field
1. Added field "Customfield: PHP code" and made it hidden with value:
<?phpreturn $data->node_data_field_pacjent_field_pacjent_uid;
?>
(to know what fields are in $data you can print_r them)
2. Then this field shows in replacement patterns as [phpcode_1] - simply use it