10/29/2014 at 9:18 am
#308417
Keymaster
@ Lingbo Li
Very nice! The monotone style looks great!
Unfortunately I do not have a simple way to get a permalink to an entry page. A rather glaring oversight really. Here’s what can be done, add this to your template:
$anchor = cnURL::permalink( array(
'type' => $atts['target'],
'slug' => $entry->getSlug(),
'title' => $entry->getName( $atts ),
'text' => $out,
'home_id' => $entry->directoryHome['page_id'],
'force_home' => $entry->directoryHome['force_home'],
'return' => TRUE,
)
);
preg_match( '/href="(.*?)"/', $anchor, $matches );
$url = $matches[1];
You should now be able to wrap the $entry->getImage(...) call in the template with an anchor tag using $url as they href.
I know this does not help you now, but I’ll be adding a simple way to grab the entry permalink in the next release.
Hope that helps!
