5 votes

uLoremsy - Property Prevalue Setter

uLoremsy allows you to set prevalues for properties.

See a demo here: http://www.screenr.com/87Ls

Prevalues are set in a simple xml file (/config/uLoremsy.config). uLoremsy allows you to define prevalues for different site roots (see example xml below).

<?xml version="1.0"?>
<uLoremsy>
    <tree nodeName="Simple website" enabled="true">
        <documentType nodeTypeAlias="umbTextpage" enabled="true">
            <property alias="bodyText" enabled="true">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit.
            </property>
        </documentType>

<!-- example using wildcard for nodeTypeAlias -->
<documentType nodeTypeAlias="umbHomepage" enabled="true">
            <property alias="siteName" enabled="true">
                [INSERT Site Name]
            </property>
        </documentType>
    </tree>

    <tree nodeName="Simple website 2" enabled="true">
<documentType nodeTypeAlias="umbTextpage" enabled="true">
            <property alias="bodyText" enabled="true">
                [INSERT BODY TEXT HERE]
            </property>
        </documentType>
    </tree>

</uLoremsy>

 

You do not have to define prevalues for all your tree roots and doctypes. Wildcards can be used. 

Example 1:
Secifying a wildcard for any Tree root:
<tree nodeName="*" enabled="true">

Example 2:
Specifying a wildcard for any doctype
<documentType nodeTypeAlias="*" enabled="true">

 

Extra properties

Supported .Net values

  • DateTime.Now
  • DateTime.UtcNow

 

Supported Umbraco Document values

  • Document.Id
  • Document.DateCreated
  • Document.DateUpdated
  • Document.Name
  • Document.NodeTypeAlias

 

Supports Umbraco values from ancestor Document
eg. To get the name of the parent
Document.Parent.Name

eg. To get the name of the grandparent
Document.Parent.Parent.Name

Supports Custom properties of ancestor Documents
Eg. If the parent contains a property called bodyText
Document.Parent.Properties.bodyText

Eg. If the grandparent contains a property called bodyText
Document.Parent.Parent.Properties.bodyText

 

Version History

v3.0.0
- For Umbraco 7 

v2.0.0
- For Umbraco 6 

v1.3.0
- Added comma separated doctypes

v1.2.0
- Supports specific Umbraco properties and custom properties (including from ancestors)
- Processes wildcards first.

v1.1.0
- Supports DateTime.Now and DateTime.UtcNow

 

Screenshots

Package owner

Anthony Dang

Anthony Dang

Anthony has 2555 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
8.0.x (untested)
7.14.x (untested)
7.13.x (untested)
7.12.x (untested)
7.11.x (untested)
7.10.x (untested)
7.9.x (untested)
7.8.x (untested)
7.7.x (untested)
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Package Information

  • Package owner: Anthony Dang
  • Created: 16/11/2011
  • Current version 2.0
  • License MIT
  • Downloads: 3897

External resources