Ticket #901 (new enhancement)

Opened 8 years ago

Last modified 7 years ago

ArticleMgr: make array of items with categories

Reported by: werner Assigned to: aj
Priority: normal Milestone:
Component: module - publisher Severity: open
Keywords: Cc:


so you avoid spaghetti code like in add/edit method:

if ($input->dataTypeID == 2 || $input->dataTypeID == 6)

which can be pretty ugly when you have more item types.

a simple

if ($in_array($categoryItems))

would be much more elegant

most elegant solution would be if the item object knows if it uses categories or not which would break BC and schema.


$item = & new SGL_Item();
$usesCategories = $item->usesCategories(); // true or false

Change History

05/18/06 07:40:46 changed by werner

why don't we just define that every item can use categories? is there really need to say that static html article doesn't have categories?

IMHO it's better for dealing with high numbers of items to sort even static html articles in categories.

08/07/06 01:18:48 changed by aj

  • cc set to demian.

This is one of the first peices of code I remove when setting up a site that uses the publisher module. What do you have to say about it Demian?

08/07/06 08:47:22 changed by demian

Hi AJ - i'm not sure which code you're referring to that you remove.

08/07/06 09:43:54 changed by werner

the code in ArticleMgr afaik as listed above in the description of this ticket

When working w/ aj on sgl_item we decided to make ALL item types with categories, even StaticHtmlArticle which is the same like HTMLArticle then but can be accessed directly in SectionMgr

08/07/06 10:07:59 changed by demian

  • cc deleted.

sounds fine to me, I suppose you could also set the catId to null for static articles, doubt that would break anything.

08/24/06 16:45:50 changed by werner

  • severity changed from not categorised to need feedback.
  • milestone set to 0.7.0.

aj: your comment on static articles' catId = null ?

12/19/06 22:48:12 changed by aj

We could set it to null it wouldn't break anything. We could also allow static articles to be assigned to a category. This would make it so there is no difference between the 2 html article types and would us to remove it. I never use the Static Article type and think ti'd be more intuitive if we only had one html article type.

12/20/06 17:40:22 changed by demian

  • milestone changed from 0.7.0 to 0.6.2.

be handy if we could include this improvement for the 0.6 series, i imagine cms module will be used after that. also, there are lots of folks using static articles so of course we have to respect that. i don't have any big opinions as these proposed changes don't affect me.

02/20/07 06:13:33 changed by lakiboy

My 2 cents. I recently used publisher for one of the projects, and i must admit categories for static html articles are very helpful.

03/22/07 06:24:04 changed by demian

  • severity changed from need feedback to open.
  • milestone deleted.

as no patches are coming in for this ticket i'm de-scoping it