How would I go about changing the "title" of a CCK form from "Create [Content Type Here]" to "Add a bar" (where Foo is the content type) - I've seen advice to use string-override, but as of yet, I've not been able to figure out what to replace.
-- cgp
I don't think the String Overridehttp://drupal.org/project/stringoverridesmodule will alter those titles. Maybe I've just not figured out how to make it do so. There are at least two ways to deal with this, I think.
Create a module to which uses hook_form_alter to change/remove the offending title. This is how I've done it, before. ( http://www.lullabot.com/articles/modifying-forms-5-and-6 for ideas how to go about this)
Alternatively, you could modify the variable at the theme level via a preprocess function or via template files.
Brian
On Mon, Aug 31, 2009 at 8:34 PM, Chris Pall chrispall@gmail.com wrote:
How would I go about changing the "title" of a CCK form from "Create [Content Type Here]" to "Add a bar" (where Foo is the content type) - I've seen advice to use string-override, but as of yet, I've not been able to figure out what to replace.
-- cgp
-- [ Drupal support list | http://lists.drupal.org/ ]
the string you are trying to change is probably something like "Create @content" so perhaps use the Locale core module to find it first, then see if String Overrides is capable of changing it or not.
Neil ----- Original Message ----- From: Brian Choc To: support@drupal.org Sent: Tuesday, September 01, 2009 2:43 PM Subject: Re: [support] CCK Form Titles
I don't think the String Override module will alter those titles. Maybe I've just not figured out how to make it do so.
There are at least two ways to deal with this, I think.
Create a module to which uses hook_form_alter to change/remove the offending title. This is how I've done it, before. (http://www.lullabot.com/articles/modifying-forms-5-and-6 for ideas how to go about this)
Alternatively, you could modify the variable at the theme level via a preprocess function or via template files.
Brian
On Mon, Aug 31, 2009 at 8:34 PM, Chris Pall chrispall@gmail.com wrote:
How would I go about changing the "title" of a CCK form from "Create [Content Type Here]" to "Add a bar" (where Foo is the content type) - I've seen advice to use string-override, but as of yet, I've not been able to figure out what to replace.
-- cgp
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Brian Choc Technology Director
Teaming for Technology Colorado 2505 18th St. Denver, CO 80211 P: 303.561.2377, F: 303.455.6462 http://www.t4tcolorado.org
------------------------------------------------------------------------------
-- [ Drupal support list | http://lists.drupal.org/ ]
Thanks, this is actually what I did. -- cgp
On Tue, Sep 1, 2009 at 1:43 PM, Brian Choc bchoc@t4tcolorado.org wrote:
I don't think the String Overridehttp://drupal.org/project/stringoverridesmodule will alter those titles. Maybe I've just not figured out how to make it do so. There are at least two ways to deal with this, I think.
Create a module to which uses hook_form_alter to change/remove the offending title. This is how I've done it, before. ( http://www.lullabot.com/articles/modifying-forms-5-and-6 for ideas how to go about this)
Alternatively, you could modify the variable at the theme level via a preprocess function or via template files.
Brian
On Mon, Aug 31, 2009 at 8:34 PM, Chris Pall chrispall@gmail.com wrote:
How would I go about changing the "title" of a CCK form from "Create [Content Type Here]" to "Add a bar" (where Foo is the content type) - I've seen advice to use string-override, but as of yet, I've not been able to figure out what to replace.
-- cgp
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Brian Choc Technology Director
Teaming for Technology Colorado 2505 18th St. Denver, CO 80211 P: 303.561.2377, F: 303.455.6462 http://www.t4tcolorado.org
-- [ Drupal support list | http://lists.drupal.org/ ]
FYI. I'd be interested in the code for this. I have a bug in the form defaults module that I need to correct a bug on and it might be able to be used for such things.
Feel free to contact offline at metzlerd@evergreen.edu
________________________________
From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Chris Pall Sent: Wednesday, September 02, 2009 7:56 AM To: support@drupal.org Subject: Re: [support] CCK Form Titles
Thanks, this is actually what I did. -- cgp
On Tue, Sep 1, 2009 at 1:43 PM, Brian Choc bchoc@t4tcolorado.org wrote:
I don't think the String Override http://drupal.org/project/stringoverrides module will alter those titles. Maybe I've just not figured out how to make it do so.
There are at least two ways to deal with this, I think.
Create a module to which uses hook_form_alter to change/remove the offending title. This is how I've done it, before. (http://www.lullabot.com/articles/modifying-forms-5-and-6 for ideas how to go about this)
Alternatively, you could modify the variable at the theme level via a preprocess function or via template files.
Brian
On Mon, Aug 31, 2009 at 8:34 PM, Chris Pall chrispall@gmail.com wrote:
How would I go about changing the "title" of a CCK form from "Create [Content Type Here]" to "Add a bar" (where Foo is the content type) - I've seen advice to use string-override, but as of yet, I've not been able to figure out what to replace. -- cgp -- [ Drupal support list | http://lists.drupal.org/ ]
-- Brian Choc Technology Director Teaming for Technology Colorado 2505 18th St. Denver, CO 80211 P: 303.561.2377, F: 303.455.6462 http://www.t4tcolorado.org
-- [ Drupal support list | http://lists.drupal.org/ ]