xmp-snippets README
Reduce the time you spend on creating complex XMOD Pro forms and templates, as well as Form.X forms within XMP templates. Author and edit XMP form and template .ascx files directly. The form and template editor built into XMP is a great tool, but you may prefer VS Code as your go-to HTML editor. Together they are a great combination - quickly write the bulk of your code in VS Code and fine tune it in the XMP editor.
XMP Snippets
XMP Snippets simply allows you to quickly scaffold simple to complex XMod Pro Templates and Forms. In addition there is also support for Form.X form controls as well. Currently there are 290 snippets for you to use, and about half support the direct editing of .ascx files.
XMP Snippets are very easy to use
- For XMP Template Controls start by typing xt, followed by the start of the desired template control.
- For XMP Form Controls start by typing xf, followed by the start of the desired form control.
- Form XMP Token insertion start by typing tk, followed by the start of the desired token.
- For Form.X Form Controls start by typing fx, followed by the start of the desired Form.x control.
- For Direct Editing of XMP Template in ascx files start by typing _xt, followed by the start of the desired template control.
- For Direct Editing of XMP Forms in ascx files start by typing _xf, followed by the start of the desired template control.
- For Direct Insertion of XMP Tokens in ascx files start by typing _tk, followed by the start of the desired token.
- For Direct Editing of Form.x Forms in ascx files start by typing _fx, followed by the start of the desired template control.
Benefits
There are many benefits to coding XMod Pro Templates and Forms in VS Code with XMP Snippets over the traditional method. A few are listed below:
- All the benefits of the top rated code editor.
- Directly create and edit XMP form and template .ascx files.
- Code in VS Code and View in your browser side by side.
- Multiple Undos! Even undo past your last save as long as you have not closed the open file or VS Code.
- Easy Versioning, and can even use git.
- Quickly Scaffold projects in VS Code in one screen and copy and paste into the XMP Editor in another screen.
- Tab through each inserted control's properties to set their values.
Features
The XMP snippets are broken into three types.
- Template Controls (xt or _xt)
- Form Controls (xf or _xf)
- Form.X Controls (fx or _fx)
XMod Pro Templates and Forms, prefix with xt or xf accordingly. Then start to type the name of the desired XMod Pro control.
Form.X form controls in XMP Templates, prefix with fx. Then start to type the name of the desired Form.X control.
Create and Edit XMP Form and Template ASCX files, prefix with _xf, _xt, or _fx. Then start to type the name of the desired Form.X control or template.
Requirements
No Requirements to create files.
Requirements to view files
- DNN instance running live or in dev environment. Open source and free DNN Community Edition
- XMod Pro module installed in DNN. No license required to run in dev environment XMod Pro
- Optional - Form.X module installed in DNN. License Required Form.X
To work with .ascx files you need to change the language mode of the files from "xml" to "html" or add the following to your VS Code settings json file: "files.associations": {
"*.ascx": "html"
}
Known Issues
No known issues as of publish date
Release Notes
v 1.2.62
v 1.2.61
v 1.2.60
Add Token Snippets for xmp "tk" and aspx "_tk" files (22 new snippets total).
- add the following token types for both xmp (copy and paste), and aspx (direct editing) file types. Most tokens snippets have selectable value tab stops.
- Cookie
- DateAdd
- DataParameter
- FormParameter
- Join
- Module
- Page
- Portal
- Request
- URL
- User
v 1.2.53
Updated _xt snippets.
- Updated "Value" reference in _xt snippets from [[Token Name ]] to correct aspx style reference <%#Eval("Values")("Token Name")%>, which displays as [[Token Name]] in XMP Editor.
v 1.2.52
Bug fixes.
- Fixed missing "/" in closing DetailDataSource tags.
- Moved both DetailDataSource and ListDataSource tags from xf, _xf to xt and _xt
- Fixed missing Display= in xmod:Redirect tags
v 1.2.51
Added Snippets and bug fixes.
- Fixed _xf Form snippet. Added closing slash in a text control that was throwing an error.
- Added _xf Basic Form snippt
- Added Separate _xf snippets for AddForm, AddSuccess, EditForm, and EditSuccess templates
v 1.2.5
Added Snippets and bug fixes.
- Added xf Output Parameter snippet.
- Added fx and _fx snippets for SilentPost, SqlCommand, and Twillo actions.
- Fixed both the _fx fx:Addbutton and _fx fx:EditButton controls - missing runat="server".
- Added to fx and _fx In Line Edit Form .
v 1.2.4
bug fix.
- Added 'runat="server"' to _fx FormX InLine Edit Form Template_ascx.
v 1.2.3
bug fix.
- Reassigned ascx xmod:Template from _xf to _xt prefix.
v 1.2.2
Added snippets and bug fix.
- Added Section Comment snippet.
- Fixed closing tag on SubmitCommands.
v 1.2.1
Added snippets.
- Added standard and ascx Join Functions
v 1.2.0
Added Support for Direct Editing of XMP ASCX Files.
- Added 52 _xt snippets for XMP template controls for ascx files.
- Added 73 _xf snippets for XMP form controls for ascx files.
- Added 5 _fx snippets for Form.X form controls for ascx files.
- Added 1 _xp snippet for Token Replacement in XMP ascx files.