category - subcategory problem

category - subcategory problem

Monday 19 April 2004 2:23:03 am - 3 replies

Author Message

Gunnstein Lye

Monday 19 April 2004 7:24:45 am

If I understand you correctly, you don't need to store the first parameter. If you have stored subcat21, then you know that the first parameter must be cat2. No need to store both.

Alessandro Cipriani

Tuesday 20 April 2004 12:14:56 am

hi Gunnstein,
yes, i could do it,
but our customer asked two combos exactly in the way i explained in my first post.
so, before call him to tell that it's not possible, i wonder if there is a way to do what he wants.
also i tried to insert some javascript code inside the register.tpl file but, as any attribute is loaded programmatically, i'll have to change the entire code of the file.

is there any alternative way?
best regards
alessandro

Gunnstein Lye

Tuesday 20 April 2004 12:40:48 am

You can of course have two combo boxes, but you only need to store the second one. You can use the first one only to choose the right content for the second one (with javascript).

I suggest you use alternative attribute views, for instance:

(in register.tpl)
{attribute_edit_gui view="myspecialjavascript" attribute=$myattributelist.myattribute}

Now, create your special attribute in mydesign/content/datatype/edit/myspecialjavascript/ezselection.tpl
(if your attribute is an ezselection, of course.)

This way you don't have to have the same template for all attributes of the same type.

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.