Page 1 of 1

Can any of the module generators do 'attributes'?

Posted: Fri Sep 07, 2012 1:27 am
by Simon66
[EDIT: Sorry - don't know how this ended up in the lounge - I was trying to get a CMSms or module developers opinion on this.]

Hi
I'm using the 'products' module ATM to create recipes.
But I'm only using the name, details and 'attributes' fields.

Each product 'name' is the recipe name, 'details' is the recipe instructions and the 'attributes' is the recipe ingredients.

Each ingredient is put in the attribute name field eg. Chicken Stock, and the quantity put in the attribute sku field eg. 2 Litres.
Then I add as many attributes as I like per recipe for a complete ingredient list, and output to a table in the template.

This works but it's not ideal. There are many unfilled fields with seemingly pointless data types (for a client putting in a recipe).

My question, I suppose, is: Can any of the module generators duplicate the 'Attribute' feature found in Calguys Products module?

I'm trying to get/create a small, clean module, preferrable called 'Recipes' with a name field, a description field with editor, and a repeating attributes section with two fields - ingredient text field and quantity text field.

Any ideas?

Simon66

Re: Can any of the module generators do 'attributes'?

Posted: Fri Sep 07, 2012 8:41 am
by mcDavid
would it be a problem to use a textfield with editor to insert a complete list of ingredients? Because if that's no problem you can just make a "recepies" category in the news module with a custom field for the ingredients.

you can even fork it to change the name to "recepies" but I wouldn't recommend that, as you won't get updates for it anymore.

Re: Can any of the module generators do 'attributes'?

Posted: Sat Sep 15, 2012 11:09 am
by psy
Have you tried using the module_custom directory?

This requires a little bit of setting up but is brilliant. It allows you to customise admin templates without touching the code.

See the new (very nice) doco at

Code: Select all

http://docs.cmsmadesimple.org/customizing/customizing-admin-templates
Tip: It's safest to change any field you do not want to appear on your client's version to a hidden field ie, <input type="hidden"....> so that all the required form fields/params post.