Read More link in Drupal Advanced Poll module not respecting the path alias -
i have advanced poll on home page , reason read more url shows as: http://www.mydomain.com/node/265
but, in poll have url path setting set this... , works great directly: http://www.mydomain.com/poll/name-of-my-poll
does know why poll doesn't use path alias or how can fix it?
thanks much!
figured out...
i had put in template.php file:
function mytheme_advpoll_view_block_poll($nid) { $node = advpoll_view(node_load($nid), false, false); $output = ''; if ($node && $node->status && $node->active && $node->start_date < time() && $node->end_date > time()) { $output .= '<h3>' . $node->title . '</h3>'; unset($node->content['body']); $output .= drupal_render($node->content); $output .= l('read more...', drupal_get_path_alias('node/' . $nid)); } return $output; }
Comments
Post a Comment