I'm building a website that has a common header across lots of pages and I want to source in that header. How do I do this with markdown? Matt -- I'm starting a blog. http://blog.tplus1.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20070810/9c4d5745/attachment.html>
Matthew Wilson <matt at tplus1.com> 07-08-10 12:29>I'm building a website that has a common header across lots of pages and I >want to source in that header. How do I do this with markdown?Take the result from Markdown and put it into a template (which contains the header etc), in it's simplest form it's just a search and replace. For example: theTemplate = "<html> .... <body> .... ##PageContent## ... </html> print searchAndReplace(theTemplate, "##PageContent##", Markdown( pageContent ) ) Something like that. jem -- Jan Erik Mostr?m, www.mostrom.pp.se
Jan Erik Mostr?m <lists at mostrom.pp.se> 07-08-10 20:27>Something like that.I forgot, you can find a longer (and more complicated) example at <http://code.mostrom.pp.se/perl/perlcgimarkdown.html> jem -- Jan Erik Mostr?m, www.mostrom.pp.se