Wiki Markup Guide - Macros

This page provides a guide for adding macros to a wiki page. We provide wiki support in three separate locations:
  1. a project's "Home" wiki,
  2. a project's "Downloads" wiki, and
  3. the "Personal Statement" wiki in a user profile page.
The "Home" wiki is fully supported, while the "Downloads" and "Personal Statement" wikis have limited support. View wiki support comparison guide

Wiki Guides

Index

Syntax Highlighted Code Snippet

Allows for a code snippet to be styled according to the language specified.
Source Markup
{code:c#}
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine("Hello World!");
   }
}
{code:c#}

Rendered Markup
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine("Hello World!");
   }
}
Syntax Highlighting Supported Languages
Using {code:language} as shown above.

Language Notes
aspx c# Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded C# code
aspx vb.net Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded VB.NET code
ashx Use for code snippets from .ashx files
c# Use for C# code snippets
c++ Use for C++ code snippets
vb.net Use for VB.NET code snippets
html Use for HTML code snippets
sql Use for SQL code snippets
java Use for Java code snippets
javascript Use for JavaScript code snippets
xml Use for snippets from .xml, .config, .dbml, and .xsd files
php Use for PHP code snippets
css Use for CSS code snippets
powershell Use for Powershell code snippets
markdown Use for Markdown code snippets
haskell Use for Haskell code snippets
koka Use for Koka code snippets


If you would like to see an additional language added to this list, please create an issue in our IssueTracker.

Rss Macro

The rss macro allows for the importing of external rss feeds into your wiki page.
Required Parameters
Name Description Range
url absolute url to rss feed n/a

Optional Parameters
Name Description Range Default
max maximum number of posts to display up to 20 0-20 20
titlesOnly show only the date and title of each post true/false false

Source Markup
{rss:url=http://blogs.msdn.com/jamesnewkirk/rss.xml,max=1,titlesOnly=false}
Rendered Markup
 James Newkirk's Blog News Feed 
Sunday, June 29, 2008  |  From James Newkirk's Blog

I just posted a the presentation and sample code from the Lessons Learned in Programmer Testing sessions that I did at a few conferences this summer. Click here for the details.

 James Newkirk's Blog News Feed 

Project Macro

The project macro allows you to insert project specific information into your wiki page
Required Parameters
Name Description Range
field an unnamed parameter specifying the project field to display description

Source Markup
{project:description}
Rendered Markup
This area is used for providing information and discussions about the CodePlex website.

Video Macro

The video macro allows you to insert video media into your wiki page
Required Parameters
Name Description Range
url absolute url to video media n/a
type media type of the video flash/quicktime/real/windows/youtube/channel9/vimeo

Optional Parameters
Name Description Range Default
align alignment of the video left/center/right center
height height of the video px/pt/pc/in/mm/cm/%/em/ex 285px
width width of the video px/pt/pc/in/mm/cm/%/em/ex 320px

Source Markup
{video:url=mms://wm.microsoft.com/ms/msnse/0607/28366/CodePlexTeam_Final_MBR.wmv,type=windows}
Rendered Markup

Silverlight Macro

The Silverlight macro allows you to insert Silverlight applications into your wiki page
Required Parameters
Name Description Range
url absolute url to xap file n/a

Optional Parameters
Name Description Range Default
height the height of the Silverlight object number 200
width the width of the Silverlight object number 200
version the version of Silverlight to use 2/3/4/5 5
gpuAcceleration enables gpu acceleration for Silverlight > 2 true/false false

Initialization Parameters
If your Silverlight object requires initParams to be set, you can add arbitrary key/value pairs to the markup. They will be combined and rendered correctly at runtime.
Source Markup
{silverlight:url=http://silverlight.microsoft.com/Assets/ToolkitBanner.xapp,height=285,width=880}
Rendered Markup

Last edited May 23, 2013 at 12:06 AM by pranavgk, version 24