Revision as of 16:51, 19 May 2008 by seppo_fn (Talk | contribs)

Code example instructions

From Nokia Developer Wiki
Jump to: navigation, search

This page gives instructions and recommendations how to create code example articles at the Forum Nokia Wiki.


Create a page

-Search for the name of the page you want to create (use the Go button) - then accept the invitation to create a new page.

General instructions on Wiki article creation are provided on Wiki Help page.

Instructions on using features related to code examples are detailed in the following sections.

Apply a template (optional)

Forum Nokia provides a ready-made template with predefined subheadings that you can use. Using the template is not mandatory, but it may help you formulate the article. You can also change the headings to suit your example. The template can be found here. Note that cannot start writing on the template page directly but you need to copy the contents of the template and paste them to your page.

Code snippet template for developers

Use categories

Add Code Examples category in order to get your example counted. Select also relevant technology and application area topics from the drop-down list.

FN Wiki category selection.JPG

NOTE: Because of some temporary changes the drop down box may not have Code Examples as a category. If it does not you may need to manually enter it in the article.

For example if you had already chosen Python as a category to enter it when you previewed the article, simply add the cateory Code Examples right after the Python category like this:
[[Category:Python]] [[Category:Code Examples]]

Use advanced code syntax display (optional

You can use advanced syntax display for Java, C, and FlashLite code:

Add an attachment (optional)

You can provide the example application or any related file as an attachment. Note that the attachment is on a separate wiki page – it is not pysically on the article page.

Make sure that the attachment has a reasonable file name, and it is highly recommended to wrap it in a ZIP package. To upload an attachment, simply select "Upload File" from the navigation menu, select the local file, and upload. Please take the time to categorize and append summary information to the upload.

Select at least the category Code example and the technologies that the example addresses.


Note that all attachments are labeled as images – in other words, the attachment title has the format Image:[filename].

To link the attachement to the article, go the article and add a wiki link to the attachment by typing the attachment page title in double brackets.

To create a link from your code snippet article to the attachment, go to the article and copy-paste the title of the attachment page in double brackets at the point where the attachment is needed. For example, [[Image:code_example.zip]]


Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.