How can I change the default name when adding categories to my component #193

Closed
opened 2017-12-05 13:01:33 +00:00 by kevincam3 · 3 comments
kevincam3 commented 2017-12-05 13:01:33 +00:00 (Migrated from github.com)

I would like to change "Game Category" to "Categories" like default Joomla! articles does. I know I can do a language override but was wondering if it could be done directly prior to compile time.

image

I would like to change "Game Category" to "Categories" like default Joomla! articles does. I know I can do a language override but was wondering if it could be done directly prior to compile time. ![image](https://user-images.githubusercontent.com/870934/33608367-75965602-d9ab-11e7-8e71-90a588489dea.png)

Sorry for the slow reply here... in the xml of the category field add the following:

othername="Categories"

That should do it, if you still having issue, check out the code here on lines 1434 in the complier where it start building that logic. Then follow the $this->catOtherName class variable around to see how we use it.

Hope this helps!

Sorry for the slow reply here... in the xml of the category field add the following: ``` othername="Categories" ``` That should do it, if you still having issue, check out the code here on lines [1434](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/c_Fields.php#L1434) in the complier where it start building that logic. Then follow the `$this->catOtherName` class variable around to see how we use it. Hope this helps!
kevincam3 commented 2017-12-14 06:42:37 +00:00 (Migrated from github.com)

@Llewellynvdm thanks. That worked. I had to look at the code because you have to also set: view="view name" and views="views name". I modified the Fieldtype to include these values. Thanks for pointing me in the right direction. I would've never known about these other options.

@Llewellynvdm thanks. That worked. I had to look at the code because you have to also set: view="view name" and views="views name". I modified the Fieldtype to include these values. Thanks for pointing me in the right direction. I would've never known about these other options.

Okay great, you are welcome.

But hey you can find tones of hidden tricks in JCB if you read over the compiler and try to understand how the compiler does what it does, since once you manage that you will become empowered developer of JCB 👍

Okay great, you are welcome. But hey you can find tones of hidden tricks in JCB if you read over the compiler and try to understand how the compiler does what it does, since once you manage that you will become empowered developer of JCB :+1:
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#193
No description provided.