Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Just for a POC i was working on, Need to check weather we can restrict a Schema available only for a particular Folder "A". Means while creating component inside folder "A" that schema should populate in Schema Dropdown. If we are creating component out of folder "A" that schema should not be available in Schema Dropdown. Is this possible?

share|improve this question
3  
Are you sure this is exactly what you need? I could imagine the idea comes from only allowing certain business groups to create Components based on said Schema -- which is possible to do using security instead (while still letting people organize their Folders as they like). – Peter Kjaer Jan 28 at 14:24
    
Yes @PeterKjaer , we need exactly the same functionality. but that schema shouldn't appear in schema dropdown while creating component out of folder "A". if possible please explain how we can achieve this using security? – SDLBeginner Jan 28 at 14:32
2  
You cannot. You can only limit who gets to see it, not in which Folders. I'm not even sure how you would want to manage that... – Peter Kjaer Jan 28 at 15:04
    
@PeterKjaer Good point about security. – Raj Kumar Jan 28 at 15:16
2  
I understand the requirement. The best fit with how Tridion works is to set a default Schema for most folders. Outside of "A" there will be a default option. Technically there's an impractical setup that does what you're asking for: one folder outside A per publication with localized permissions per Publication. No, don't do that. – Alvin Reyes Jan 28 at 15:59
up vote 9 down vote accepted

The nearest to an out of the box solution you have available is described by Alvin in the comments - and as Alvin indicates - it's not a good solution.

You could interact with the Event System and stop saving on non-permitted schemas. There are a few implementation patterns you could consider such as:

  • folder metadata with, say, a category of 'locked schemas' and a list of keywords representing schemas (with the WebDAV URL contained in the keyword definition). I'd start single selection but would ensure the code works with multi-select just in case
  • a config/mapping file to manage only specific schema in specific folders - this config could be generated from a text field, a structured component offering different formats of input from key:value text fields to controlled lists with category keywords similar to the above
  • capture the save event and then retrospectively move the component
    • this isn't too helpful for an editor if they're not duly informed and you'd need to consider avoiding name conflicts with existing components and how/if you could control access to the target folder given the Event System would be moving the item (and what you would do if the user shouldn't have access) << I've only added this as something to be aware of - it's certainly not a suggestion

You could branch out and really help the editors through a GUI extension - the biggest benefit over the Event System solution alone is that editors can be 'spoon-fed' and not put through the pain of almost compelting a taks and then hitting 'save' to be told that's not allowed.

The most contentious could be to train and trust editors. To Alvin's point - adding the 'default' schema to folders often works (if the IA/content structure in general suits) as it's then a concious decision for an editor to select another content type. Further to this ensuring that editors are informed of the reasons for something often coerces compliance :)

share|improve this answer
    
Regarding third point, but if editor do not know where to create component, how would he find the component after event system move it to some x folder. that would be another challenge for non-tech editor. – Raj Kumar Jan 29 at 7:14
    
Agreed Rag, I'd tried to capture this with "isn't too helpful for an editor if they're not duly informed" but it's a good call-out thanks. – Dylan .. Mark Saunders Jan 30 at 12:22

You can restrict one schema to a folder, then only component of that schema can be created in that folder. but there is no OOTB mechanism to restrict this from appearing in another folder. My be you need to restrict than each folder with a schema to achieve it, but very cumbersome.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.