Sitecore / Sitecore.Pathfinder

Get started, get far, get happy!
Other
34 stars 12 forks source link

Allow defining all standard values for a template #66

Closed adeneys closed 7 years ago

adeneys commented 7 years ago

It would be nice to be able to define standard values for a template in a more compact manner; by defining them inside the template definition itself:

- Template: MyTemplate
    BaseTemplates: /sitecore/templates/sample/Sample Item
    Icon: Office/32x32/document_text.png
    StandardValues:
        - en:
            Title: Default Title

This saves us from having to create a separate __Standard Values item and setting the field of the standard values item in the template field values.

JakobChristensen commented 7 years ago

You can now specify a __Standard Values item as part of the template. This follows the standard format for items.

- Folder: Tests
    ItemPath: /sitecore/client/Applications/SitecoreWorks/content/TemplateStandardValuesTest
    Database: master
    - Items: 
        - Template:
            Name: TemplateStandardValuesTest
            - Section: Fields
                - Field: IsActive
                    Type: Checkbox
                    Sharing: Shared
                - Field: Text
                    Type: Single-Line Text
                    Sharing: Unversioned
            - TemplateStandardValuesTest: __Standard Values
                - Fields:
                    IsActive: true
                    - en:
                        Text: Welcome to Sitecore
                - Layout:
                    - Default: Sample Layout
                        - main:
                            - Sample Sublayout:
                                - centercolumn:
                                    - Sample Inner Sublayout:
                                        - content:
                                            - Sample Rendering: