Commit 4286a985 authored by Caleb Weeks's avatar Caleb Weeks

adding option for wildcards to specify type of allowed children

parent 37b5b89d
......@@ -176,7 +176,14 @@ module.exports = function(parentPath, slingConnector, options, cb){
byCategory[category]=byCategory[category] || [];
byCategory[category].push({ type:type, componentClass, longName:longName.join(" / "), icon: componentIcons[componentClass], title, name: (pageName==="*" ? "" : pageName), unavailable:existingChildren.indexOf(pageName)>-1?"unavailable":false });
if(pageName==="*" && pageRules.allowed){
_.each(pageRules.allowed, (options, allowedName)=>{
byCategory[category].push({ type:type, componentClass, longName:longName.join(" / "), icon: componentIcons[componentClass], title: options.title || title, name: allowedName, unavailable:existingChildren.indexOf(allowedName)>-1?"unavailable":false });
});
}else{
byCategory[category].push({ type:type, componentClass, longName:longName.join(" / "), icon: componentIcons[componentClass], title, name: (pageName==="*" ? "" : pageName), unavailable:existingChildren.indexOf(pageName)>-1?"unavailable":false });
}
allTypes.push(id);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment