As I said everything in Sitecore is indeed an Item. If you understand the way Item is represented knowing sitecore as CMS will be more easy.
Use Case: I want to cut down my time to create user defined template by 50% rather than creating it from sitecore content editor or using sitecore rocks. I used Sitecore Powershell Extension to my rescue.
In my case, there are 4 steps involved while creating a user defined template.They are as follows:-
- Create New Item using Template Item
- Create Standard Value Item for this new item
- Add Base Template which is already defined.
- Add Common Renderings across template.
The above is very specific to scenario I had in my project. Somehow I wanted to play with SPE. I tried this and it helped me save 50% of the work effort.
Go to TDS pick up any item and you will see the internal representation of field or standard field variables with key and name. Use this to set values using SPE.
Important to remember , when you want to assign or set standard field values switch on RAW values option from Tab Menu->View-> click on checkbox to enable it,
Using these raw values we can assign the predefined base template and renderings.
You can checkout the code snippet in Gist for more details.
Code Snippet 1
Sample TDS Code : Lookup Standard Field Variables
templatekey: Menu Item
Hope this is helpful.