Thunder: Edit Resource class files
You can edit a resource class file using Sitefinity CMS Thunder:
- In the Solution Explorer, select the file that contains the resource class.
- Open its context menu and select Edit with Thunder
On the left side of the editor you see the code regions inside your file. If you select a region, the system filters the resources by showing the resources inside the selected region, including the resources inside its child regions.
In the upper-right corner of the editor there is an option for searching for resources inside the selected region. The search searches inside the Key, the Value, and the Description of the regions.
On the right side of the editor you can see the resources. Each resource consists of Key, Value, Description, and Modified.
- The Key must contain only letters, digits, and underscores.
It must be unique. - The Value is the text that you see when you call the resource.
- The Description is a short description of the resource.
- Modified shows the date when the resource was last modified.
This is a read-only column and is automatically updated when you create a resource or edit its Key, Value, or Description.
IMPORTANT: You must escape all special string characters inside the Value and the Description. For example, use \n for a new line or \\ for a backslash.
Adding a new resource
You can add new resources to the resource class file by performing the following:
- Select the region where you want to add the new resource.
If you select All, Thunder adds the resource at the bottom of the file, outside of any other resources. - Select the empty line at the bottom of the resources grid and enter the Key of the resource.
- Enter the Value of the resource.
You can go to the value of the resource by pressing TAB after you have entered its Key. - Enter the Description of the resource.
You can go to the description of the resource by pressing TAB after you have entered its Value. - Press ENTER to commit the new resource or ESC to cancel.
Editing a resource
You can edit an already existing resource, after finding the resource, perform the following:
- Select the Key, the Value, or the Description that you want to change.
- To switch the cell into edit mode, press F2 or start typing to replace its current value.
- Press ENTER to commit the change or ESC to cancel it.
Deleting a resource
To delete a resource, select the resource that you want to delete and press DELETE. To discard the delete, you must close the editor and discard the changes.