By imp7 on
Hello, I am trying to insert the raw url for the nodes in a views fields custom tpl.php file,
so I want to be able to have control over all the markup for use with some specific jquery effect,
I want to simply put href="<?php print $fields['node_path']->content; ?>" into the markup.
There does not seem to be any way with the default views fields, after searching I found the very nice http://drupal.org/project/views_customfield module
but the closest I can get is <?php print $data->nid ?> it much preferred to use the paths generated from pathauto.
Any help would be greatly appreciated :)
Comments
well figured it out for a php
well figured it out for a php custom field, I love this kind of control over the markup!
<?php $alias = drupal_get_path_alias('node/'.$data->nid); print $alias; ?>Thanks!
It helps me a lot!
Quite helpful
The Custom Field module should have this function built in
Thanks
Great help, thank you.
Worked it out
.
Can you post your solution,
Can you post your solution, cheers.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.