Giter Club home page Giter Club logo

single-cat's People

Contributors

carlcs avatar elivz avatar engram-design avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

single-cat's Issues

When matrix group is collapsed only category id is shown

image

It would be much more user friendly if the category name was shown:

image

The built-in categories field shows the category names in this context.

Would you consider adding this for consistency with the built-in categories field?

Ability to target parent category

I think one cool feature would be the option to target a parent category so that the dropdown displays all the children categories of that parent category.

Single Entry

What are you trying to do?

Hi, now that the entrification of categories etc. is taking place, a single relation plugin would be nice!

I kinda love the simplicity and I think even craft should do it like single cat if there's only one value that can be chosen.

What's your proposed solution?

single relation plugin, or single entry only, since all will be entries..

Additional context

No response

Allowing blank option silently fails validation

Hi @elivz

I'm using this in a matrix within a supertable and if I set the single category field to required and then choose the blank option it silently fails. I get an indication that the error is on that page and the matrix block has vanished.

Arguably now thinking about it further maybe the blank option is redundant given that that is what the required flag on the field does? Can you elaborate on the purpose of it?

Error in Craft 3.1

After upgrading to Craft 3.1 the field now displays this error: This field is not set to a valid category group.

Categories not pulling from correct site Id

Hi @elivz

I've just discovered that the categories are not pulling the dropdown values from the correct site:

Within SingleCatField.php around Line 123:

        $categories = Category::find()
            ->groupId($source['criteria']['groupId'])

Needs to be:

        $categories = Category::find()
            ->siteId($this->targetSiteId($element))
            ->groupId($source['criteria']['groupId'])

Is it possible you could patch this in?

Dropdown not being populated

I have a category group set up called "Product Types" with categories like Blu-ray, Book, etc. I created a new Single Cat field to pull from this group, but the dropdown is appearing empty when I try to use it in an entry. I also tried it with another category group and get the same results.

screen shot 2018-11-05 at 7 43 41 am

TypeError: Argument #2 ($branchLimit) must be of type int, null given

Describe the bug

Getting this error, and am unsure how to reproduce it. All I know is when I choose Single Cat as the field, in the CP I get this error:

craft\services\Structures::applyBranchLimitToElements(): Argument #2 ($branchLimit) must be of type int, null given, called in /srv/www/website.com/vendor/verbb/single-cat/src/fields/SingleCatField.php on line 63

Steps to reproduce

Unsure how to reproduce.

Craft CMS version

4.4.9

Plugin version

3.0.2

Multi-site?

No

Additional context

No response

Craft 4 Compatibility

This is such a useful little plugin and I would love to bring it forward into my Craft 4 projects. Are there any plans to update it?

Order of categories in dropdown

Would be cool if the order in the dropdown reflects a custom order. As of right now I don't know how they're currently being ordered.

Categories as Lightswitches

Any interest in developing a custom plugin that presents categories from a category group as lightswitches?

This field is not set to a valid category group.

Describe the bug

I select the Single Cat field type and the Category

Steps to reproduce

Just regular use... matter of fact it was working until I've update Craft.

Screenshot 2023-05-08 at 5 21 13 PM

Screenshot 2023-05-08 at 5 21 25 PM

Screenshot 2023-05-08 at 5 13 50 PM

Craft CMS version

4.4.9

Plugin version

3.0.1

Multi-site?

No

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.