Ticket #97 (new improve feature)
Add getByCategory to the new words module.
| Reported by: | jaliste | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | FrameWork | Keywords: | words |
| Cc: | felix |
Description
There is a FIXME in the new words module to add a some sort of getByCategory method to it. I create this ticket about possible implementations and use cases. In searchmember page John solved it by using some code similar to the following one
for($a in $some_list)
{
echo $words->getFormatted('FindPeople_'.$a)
}
So actually this code does the work, but you need to know the list of all words in the category to do the trick(in this case you can think that 'FindPeople?' is the category and somelist is the list of words we need from this category, is this important? Also, there are words that belong to several pages and so they belong to no category... so theses words simply wont have a category?
So, if we rely on doing category gets by the trick presented above, then the only reason I see to still implement category get from word module is because of performance. I know, the results are cached, but at SQL level, so you still have to do several querys just to get the i18n words of your page, so we could minimize the querys to get the i18n words having a category added to the DB(we can't have only one because of words with no category). Other option, would be to do the cache of words at PHP level.


