Help:How to convert a Dreamweaver page to wiki
First, you need to make your page wiki-friendly. Since the wiki generates its own navigation elements - i. e. table of contents and navigation bar, you should remove all such elements from your page. You should also remove all DIV tags, as well as any underlying tables that can be removed without disrupting the page. Don't worry about disturbing image captions and alignment, as wiki has a special syntax for handing them. For wiki to automatically generate the table of contents for your page, each section heading must be formatted as a Heading style, with the highest level formatted as a Heading 2, and lower levels at Heading 3 and below. If you use these Heading styles, then a table of contents will be automatically generated for your page.
Preparing your page for wiki conversion
Before you reformat a page for conversion, you should save it in a new file. Then, do the following in Dreamweaver for each heading on the page:
- In the Design view, click on the "KC" navigation bar at the top of the page. It should turn grey, indicating that it is selected. Press the Delete key.
- Now there should be a colored bar at the top of the page containing the article's title. Move the cursor to the top of this box. Keep moving the cursor up until it changes to four arrows. Then click the mouse.
- Now the box should be surrounded by a black border, indicating that it is selected. Press the Delete key.
- Move the cursor to just above the box containing the words NCBI Taxonomy Genome. If it changes to a down arrow, move it gradually up until it becomes a vertical bar again. Then click and drag the mouse to the top of the page. This should highlight the table of contents. Once the entire table of contents is highlighted, press the Delete key.
At this point, all navigation elements should be gone. They are unnecessary, since the wiki system automatically displays them on every page.
Next, you will need to format each of the headings so that the wiki system will automatically generate a table of contents for your page. Perform the following steps:
- In the Design pane, highlight the heading text.
- Clear any formatting that is currently applied to the text, such as bold or font size. Check the Style, Size, and Size Change submenus under the Text menu, and make sure that each one either has nothing checked or has only Default checked.
- In the code pane, add a header tag before and after the heading text. For example, to add a Heading 2, type
<h2>before the heading and
</h2>after it. After doing this, if you save (which refreshes the design view) the heading should appear larger than the surrounding text.
When you have finished all of the headings, use the Code view to go through the code and remove all DIV tags, e. g.
<div>. Also, delete any underlying tables that you can remove without disrupting the page. The tags for tables begin with a "t" and include
<td>. Don't forget to remove the closing "/" tags as well.
Performing the conversion
Once you have prepared your page, do the following to convert it to wiki format:
- In Dreamweaver, click on the code window and press Ctrl+A to select the code for the entire page.
- Press Ctrl+C to copy the code to the clipboard.
- Click here to open the htm2wiki converter.
- Click inside the "HTML source" box, then press Ctrl+V to paste your page.
- Scroll down and click on the "Convert HTML to wiki markup" button.
- When the page loads, click inside the MediaWiki markup box and press Ctrl+A.
The wiki markup is now on the clipboard. To create a blank wiki article where you can paste the markup, do the following:
- Open the Taxonomy Index.
- Click on the Edit link near the top of the screen.
- Add double brackets before
]]the title of your page.
- Click on Show Preview. If the preview looks good, save the page, otherwise, fix it using the edit box and then save.
- Click on the new link and paste the code from the clipboard into the text box.
Now scroll to the bottom of the page and click on the °Show Preview° button. The page should appear pretty much the same way as it does in Dreamweaver, though you will have to upload the images separately. When you do, however, they should automatically appear inside your page. You may want to adjust the alignment of the images and add captions by using the appropriate wiki syntax.