Closed (fixed)
Project:
Patterns
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2008 at 08:34 UTC
Updated:
16 Jan 2009 at 21:40 UTC
How might I use a tag to override the default content type of 'story' and rename it?
Comments
Comment #1
vaish commentedYou could do one of the following:
1. Change human readable name and description while leaving machine readable name as it is.
2. delete story content type and create new one according to your liking
Patterns are relying on machine readable name of content type to uniquely identify targeted content type so it is not possible to change it (the same applies to Drupal in general).
I hope this helps.
Comment #2
senpai commentedWill Patterns also honor something like <content delete=TRUE> ? It seems more user friendly. This is supposed to be for the average bear, after all.
/me goes off and tries it.
Comment #3
vaish commented<content delete="TRUE"> works fine. (Note that you forgot double quotes around TRUE).
We are working on getting more support for similar user-friendly stuff (yes/no, enable/disable, etc).
Comment #4
senpai commentedAhhh Hah! It was the lack of quotes that did it. Or didn't do it, as my case might be. Thanks for the info. I wonder if I should start a Handbook Page for the Patterns module to document stuff like this?
Comment #5
vaish commentedWhile looking at your drupal camp pattern I noticed the following comment which I felt needs some clarification:
This is actually not correct. Patterns are absolutely capable of modifying existing content types. You can edit and change all the settings, add or delete fields and groups, edit display settings. The ONLY thing that you can't change is machine readable name of existing content type as I explained above.
So there is no need to delete content type and recreate just specify existing content type name as 'type' and enter you new settings. Patterns will always first look for existing content type and update it but if content type is not found, new one will be created.
When updating the content type you need to define tags only for the settings you actually want to change. All other settings will be preserved.
Comment #6
vaish commentedDouble quotes for attributes is part of XML syntax, so I would say this comes under writing valid XML and patterns module enforcing that by doing validation check before listing or importing patterns.
Patterns documentation is also underway and we'll be publishing some stuff soon. I'm taking note of all your feedback and questions and making sure that gets mentioned in documentation as well.
Comment #7
senpai commentedRegarding #5, yeah, I figured that out as I was toying around with it, and have corrected my inline documentation, which I will eventually reflect on the http://drupal.org/node/346509 doc page.
Comment #8
ChrisBryant commentedSenpai, I emailed you with a link to the in progress documentation so that you can work from and build on top of that so there isn't duplication of efforts. As soon as things settle down with the D6 release, we can post all of that in the Drupal handbook.
Thanks for getting the doc page started!
Comment #9
senpai commentedSweet, Thanks. I'm reading up on it now.
Comment #10
senpai commentedFixored.