adding new attribute type in categories

Hello,
A customer wants to use a specific type of dates (Hijri Date)
So i guess we will need to add a new attribute type to the categories, but actually i never done this before, so any idea on where to start to develop such request.
Any documentation to start from will be helpful.
Thanks in advance, and hope all of you are healthy and safe.

Comments

  • Are you saying you want to develop a new type of attribute?  Or you just need to add a date attribute (and call it whatever you like) to some category?
    Cheers...
  • It will be a new type of attributes, Hijri Date (it's the islamic calendar), and as this date format is not supported in any DB, so it will need a lot of development.
    So basically yes it will be a new type of attributes.
  • Given the volume of effort in creating an attribute type, and given that the concept of a day is (as far as I can tell) identical between the calendars: my initial thought on this would be to store this as an integer attribute, and possibly customize how the value is presented to the end user.

    That would save a fair bit of effort, and although customization is (obviously) very possible: they increase complexity with regards to support. However this is just an initial thought - I haven't thought the details through very far on this one :smile:

    @siegel: vi is an editor with two modes: one which destroys your input and the other which beeps at you

  • @Khaled_Yasser Do you have the ADN module?  If so open that up and you will get an idea as to the development effort that Dave mentions.  AttrTable is another example of a custom attribute.  It can be VERY involved (as ADN shows), as in should it be available in columns, facets, workflow attributes, REST, import/export, SmartUI, etc...  There are partners available should you not want to tackle it yourself.
    Cheers...
  • Either store as an Integer as Dave Carpeneto was suggesting, or you can store as a Date and it will preserve internally a count of seconds since a particular time (I forget which....I recall UNIX dates were since Jan 1, 1970, but I think Oscript dates recorded a number of seconds somewhere in the middle ages). Then you would use the UI layer to present the value using the lunar calendar calculations you require.
    -Hugh
    PS if you have a Java library that already does these calculations, you can include that in your module. But everyone is right, this is a BIG dev effort.  But we're all here to help.