1
votes

I have a fairly complex view that points back to other pages within my site. I am displaying it as a block on a ton of other pages, and I would like a way to dynamically assign urls to the links that the view displays. Currently I'm sending it to just /nid - which works fine, but breaks my site structure. I would like to be able to send it instead to [current path]/nid or whatever. But I can't find a field for current path, nor an appropriate token.

So - I am trying to rewrite the field value in the view to include an a tag with the appropriate link...

Example:

<a href="[field_course_numb_value]">My course</a>

Instead I would like to use:

<a href="[some way to get current path][field_course_numb_value]">My course</a>
1

1 Answers

0
votes

I ended up solving it by making a customfield: Php code field with the following:

<?php print drupal_get_path_alias('node/'.$data->node_node_data_field_the_field_in_question); ?>