Note: As you can't set one extension to 2 different file types, it is suggested you set your editor to recognise '.np' templates as HTML files. When you edit NP JavaScript libraries alter the extension to '.js' - just remember to reset to '.np' when you're done.
Editors described:
How do I open and edit NetPublish files with the .np extension in GoLive CS? Since a NetPublish (.NP/.NPT) file is essentially an HTML/JavaScript file you will need to modify GoLive's Web Settings to accept NP files as editable documents. This will insure that NP/NPT files receive both the correct colour scheme and code handling by GoLive CS.
Open GoLive's "Edit" menu, and select "Web Settings...":
You now need to customise the Web setting dialog. Select the "File Mappings" tab and right-click the "Text" caption in the main list. From the pop-up select "Add Suffix":
Now fill out the inspector boxes as below:
Repeat the process for 'npt' using the same settings. When done, the two new additions should be listed as below:
Finished!
The screen grabs are from v7.x; the v8.x dialog's layout differs slightly but the entires you make are the same.
Open BBEdit's Preferences dialog and click "Langauages" in the left hand list:
Now click the "Add" button, top right. In the "Add Suffix" dialog type ".np" in the "Suffix" box and select "HTML" from the "Language" drop-down.
Leave the radio button as "Neither" and click the "Add" buton to add the new mapping which now appears in the list of mappings in the main Preferences dialog. Repeat the process for '.npt'. Close and save the Preferences - done!
We'll add a filter to HTML-Kit's file open dialog and colour NP/NPT files as if HTML files. Open the Preferences from the "Edit" menu and select the "File Types" tab:
In the "File" list, middle left, select the item "User" and then click "Add File Type". In the new dialog add "NetPublish(*.np,*.npt)" and click OK:
In the "Edit File Type Extensions" (bottom of main dialog) add "*.np,*.npt" and...
...then click in the File Types" listbox area above and your edit is added:
Now click the "Colorized File Types" button, (top right):
In the "File Type Extensions" dialog, scroll to the end of the top ("HTML,XML:") text box and add ";np;npt". Note each entry is semi-colon delimited (no delimiter after the last entry):
Macromedia have provided generic instructions on adding file extensions. The article refers to the MX version but may apply to older versions as well.
Question: Setting HTML Editors to recognise .np templates [FAQ00114.htm]
Last Update:- 28 April 2010
Site and articles © Mark Anderson 2001-2007 - Visit my home page