emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] menus again


From: Marc Tommasi
Subject: [emacs-wiki-discuss] menus again
Date: Mon, 13 Sep 2004 23:34:49 +0200
User-agent: Mozilla Thunderbird 0.7.3 (X11/20040803)

Hello,

In the publishing process would like to produce menus whose contents is give in the wiki page using lisp code

I've written a little function (I'm not familiar with lisp) that builds a php assoc array and call a php function display_menu.

(defun mt-write-menu (menu)
 (when emacs-wiki-publishing-p
   (let (str)
     (while menu
       (setq str (concat str
                         "$menu[] = array(\"texte\"=>\"" (car(car menu))
                         "\",\"url\"=>\"" (cadr(car menu))
                         "\",\"bulle\"=>\"" (caddr(car menu))
                         "\");\n"
                         ))     
       (setq menu (cdr menu))
       )
     (concat "<?\n" str "\n  display_menu($menu);\n?>")
   )
 )
)
I want to use this function in my wiki pages using the lisp tag:

<lisp>
(mt-write-menu
  '(("Google" "http://www.google.com"; "Press to  google")
    ("somewhere" "http://www.somewhere.else"; "Press to be somewhere))
)
</lisp>

But the code produced by publish (reproduced below ) includes <code> tags and other <p> and html tags. How can i drop them ?

<?
$menu[] = array("texte"<code>>"Google","url"</code>>"http://www.google.com","bulle"=>"Press to google"); $menu[] = array("texte"<code>>"somewhere","url"</code>>"http://www.somewhere.else","bulle"=>"Press to be somewhere");

</p>

<p>
  afficher_menu($menu);
?>

(Also, note that the two first => are changed but the third is not)

(emacs-wiki-version's value is "$Version$", the latest in sacha's devel dir)

--
Marc Tommasi         --- http://www.grappa.univ-lille3.fr/~tommasi
UFR MSES Univ. de Lille 3  59653 Villeneuve d'Ascq cedex  -- FRANCE
Phone:(+33)320416175 --- Fax:(+33)320416770
--
N'ajoutez pas mon email dans votre carnet d'adresses Outlook SVP.
Please do not add my email in your Outlook addressbook.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]