By hillaryneaf on
Is there a way to have a taxonomy term assigned for a content type that is not visible to the user when they add content (so that they cannot change the default taxonomy term)?
Is there a way to have a taxonomy term assigned for a content type that is not visible to the user when they add content (so that they cannot change the default taxonomy term)?
Comments
my investigation...
I tried several solutions none of which worked... it looks like a lot of people are looking for a similar solution:
Taxonomy Defaults looked promising, but will not work with CCK Taxonomy fields as explained here: http://drupal.org/node/208467
CCK Field Permissions looked promising (disallow some users from seeing the taxonomy field), but the default value will not stick if the field is hidden to the user as explained here: http://drupal.org/node/182084
It looks like the only not so elegant way to do it is with theming... to create a bunch of taxonomy CCK fields that have a default value assigned and hide it to the end user with CSS (display: none;) that creates the content.
Any other developments?
A Temporary Solution!
I found a solution until the above modules are updated with the necessary features...
Using the Form Markup Module, I created a taxonomy CCK field in my new content type, called something like "default news category" and set it's default term to news. I set it to required and in the Form Markup prefix field (supplied by the module) I put in the necessary html/css code
and in the suffix field
This way the field will not display to the user when they add content with this particular content type and it has a default taxonomy term or terms.
I hope this helps someone else out there!
Doesn't seem to work with Taxonomy Access
This is a nice little workaround but doesn't seem to play with Taxonomy Access... i.e. Assign a CCK_Taxonomy field to a node (using clever workaround above to give a default term) and then try protect access using taxonomy access - doesn't seem to work.
I think the issue is with the CCK_Taxonomy module as the blurb on it mentions that it only deals with the CCK tables... I don't know enough about it to comment knowledgeably but that's my hunch...