[pmwiki-users] Cookbook output help: emailto

Dave Miller dwmiller at umich.edu
Mon Mar 10 17:11:09 CDT 2008


Hi All,

I'm writing a recipe in which I need to display a mailto: link with  
multiple addresses and a subject line. My test code is as follows:

-------------------
Markup('carpool', '<img', "/\\(:carpool:\\)/e", "test()");

function test() {
	 	
	$out = '';
	
	$out = '<a href="mailto:foo at bar.com,bar at foo.com?subject=foobar">Email  
me!</a>';
	$out .= '<br/><br/>';
	$out .= '[[mailto:foo at bar.com,bar at foo.com?subject=foobar | Email  
me!]]';
	$out .= '<br/><br/>';
	$out .= '[[mailto:foo at bar.com,bar at foo.com?subject=foobar]]';
	$out .= '<br/><br/>';
	$out .= 'mailto:foo at bar.com,bar at foo.com?subject=foobar';
	$out .= '<br/><br/>';
	$out .= 'mailto:foo at bar.com,bar at foo.com';

  return $out;
}
--------------------

Only the last two lines produce working links, however there is no  
link text. Also, from the way lines 1 and 2 fail, it appears that the  
mailto: is parsed by the app, but the double brackets are not--they  
actually appear on the rendered page.

Is there a way to change the order of recipe rendering so that the  
brackets get parsed into a link? If not, how can one create a link  
with link text from a recipe?

Thanks,

Dave







More information about the pmwiki-users mailing list