sud33p / sitecoreplaceholdersettingsrules Goto Github PK
View Code? Open in Web Editor NEWThis project forked from williamsk/sitecoreplaceholdersettingsrules
Adds a rules engine field to placeholder settings items in Sitecore.
This project forked from williamsk/sitecoreplaceholdersettingsrules
Adds a rules engine field to placeholder settings items in Sitecore.
Placeholder Settings Rules -- To install, use the Sitecore package installation wizard to install the "Placeholder Settings Rules.zip" package. This will create the required items in Sitecore, place the .config file in the App_Config\Include directory, and place the DLL in your site's bin folder. One final step - you must add the Placeholder Settings Rules template to the list of base templates for Sitecore's Placeholder template. This is located at /sitecore/Templates/System/Layout/Placeholder. Once installed, you should see a new "Allowed Controls Rules" field when editing a placeholder settings item. These rules get applied on top of any renderings already specified in the Allowed Controls field and may add or remove items from the list based on some custom conditions. When editing a rule on a placeholder settings item, you will see three new conditions: 1) where the total number of renderings in the placeholder [compares to] [number]. 2) where the number of renderings [rendering] in the placeholder [compares to] [number]. 3) where the number of sublayouts [sublayout] in the placeholder [compares to] [number]. Note - the first condition uses the term "renderings" to mean ALL types of renderings while the second condition uses it to mean any rendering located under /Layouts/Renderings (as opposed to the third condition which allows you to select sublayouts from /Layouts/Sublayouts). Three new actions are also availble for placeholder settings rules: 1) [allow or do not allow] rendering [a rendering]. 2) [allow or do not allow] sublayout [a sublayout]. 3) do not allow any renderings. Again, in the case of the third action - "renderings" refers to ALL types of renderings (including sublayouts). These conditions and actions can be used to limit the options presented whenever a user attempts to add a component to a placeholder in the unified page editor. For example: where the total number of renderings in the placeholder is greater than or equal to 4 -- do not allow any renderings The above rule would allow any 4 renderings to be added to the placeholder (subject to limits set in Allowed Controls or by other rules), but then no more would be allowed. where the number of sublayouts My Sublayout in the placeholder is greater than or equal to 1 -- do not allow sublayout My Sublayout Assuming "My Sublayout" was in the Allowed Controls, this rule would allow only one My Sublayout to exist in the placeholder. After that, the option would no longer be presented. These conditions and actions can even be combined into multiple rules - to only allow one rendering type if another already exists, but still enforce a maximum number of each for example. If you have any questions or suggestions about usage of this module, or maybe just want to talk to me about the code or something - I can be reached on Twitter @williamsk000.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.