[Catalyst] Re: javascript in Catalyst using Template Toolkit
    Jonathan Rockway 
    jon at jrock.us
       
    Sun Dec 23 08:14:52 GMT 2007
    
    
  
On Sat, 2007-12-22 at 09:06 -0500, kevin montuori wrote:
>   (defun ii-insert-catalyst-url ()
>     (interactive)
>     (let ((path (read-from-minibuffer "URI: ")))
>       (insert (format "<a href=\"[%% Catalyst.uri_for('%s') %%]\"></a>" path))
>       (backward-char 4)))
This would be better written as:
  (defun ii-insert-catalyst-url (path)
    (interactive "sURI: ")
    (insert (format "<a href=\"[%% Catalyst.uri_for('%s') %%]\"></a>"
path))
    (backward-char 4))
Now you can call the function non-interactively.
Regards,
Jonathan Rockway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071223/101acc8d/attachment.pgp
    
    
More information about the Catalyst
mailing list