There aren't API or Viewtool methods to get a category by velocityvarname
We have a unique velocityvarname field on categories, but the API doesn't have a method to get a category by the velocity varname.
We should also have a viewtool method once we have the API method.
we can add this but I think its a great idea. the intention was for people to use the Key. That will use the cache. We don't want to add too many as we want to keep the cache clean.
The addition of the velocityvarname field was a mistake imho. Instead of adding it as a field, we should have just extended the idea of the key field. You should use the key field for unique ids and gettings.
On Fri, Jan 11, 2013 at 8:35 PM, Maru Ahues Bouza [email protected]:
We have a unique velocityvarname field on categories, but the API doesn't have a method to get a category by the velocity varname.
We should also have a viewtool method once we have the API method.
— Reply to this email directly or view it on GitHubhttps://github.com/dotCMS/dotCMS/issues/1808.
NOt really the key is different and NOT required. It could have been combined but they are different. The key is allowed to have characters the variable is not.
Seems inconsistent to only provide tooling to ONLY pull on a non-required field that anyone who has edit on categories can change and break a category pull.. mess up menus displaying category names... etc. We pull by velocity varname as a norm... which is not changeable once set. This ensures stability of velocity pulls/tools that rely upon those varnames. It is feasable that a standard publisher might need to create/manage categories... thereby making tooling that relies ONLY on a mutable key field that isn't even required... seems non-standard and prone to causing site breaks in velocity pulls based on cat key.
Same as roles :-)
Valid statement... I was just concerned that more users might be able to edit Cats (and mess up pulls), than users that are allowed to edit roles in the system... just throwing my penny thought out there... you guys know better than I the implications of the change, so I submit to the higher powers... :-)
That's exactly why I don't like using the category key, it can be easily changed and people won't know what they messed up until content stops showing up on the site randomly.
On Fri, Jan 25, 2013 at 7:59 AM, DeanGonzalez [email protected]:
Valid statement... I was just concerned that more users might be able to edit Cats (and mess up pulls), than users that are allowed to edit roles in the system... just throwing my penny thought out there... you guys know better than I the implications of the change, so I submit to the higher powers... :-)
— Reply to this email directly or view it on GitHubhttps://github.com/dotCMS/dotCMS/issues/1808#issuecomment-12706676.
Community Manager
dotCMS Main: 305.900.2001 Fax: 305.397.2579 www.dotcms.com http://www.twitter.com/dotCMS http://www.facebook.com/dotCMS http://www.twitter.com/mabouza
Please consider the planet before printing this email.