Giter Site home page Giter Site logo

add image for category about cartridge HOT 4 CLOSED

stephenmcd avatar stephenmcd commented on July 30, 2024
add image for category

from cartridge.

Comments (4)

stephenmcd avatar stephenmcd commented on July 30, 2024

Good idea Dmitry I think this requirement is very common.

Do you want to add it? If so, can we do it the same way the blog featured image is implemented?

  • field is named feature_image
  • add a setting SHOP_CATEGORY_USE_FEATURED_IMAGE
  • we can default the setting to True, but we'll need to add support for it in the templates. We actually had code like this a long time ago in the category.html template - the sub-categories would be listed above the products in the category. I think the bootstrap thumbnail/grid classes would work really well here.
  • admin class for category would also need to check SHOP_CATEGORY_USE_FEATURED_IMAGE and hide the featured_image field from the admin if set to False

How does that sound?

from cartridge.

dfalk avatar dfalk commented on July 30, 2024

It sounds good! Yes, I want to add it.

Also we may do the featured_image more generic: for example, place it in the Displayable model, because even page needs image for showing descending pages in teaser mode or something else. What you think?

from cartridge.

stephenmcd avatar stephenmcd commented on July 30, 2024

I don't think it belongs on the Page model (and therefore on Displayable) for the same reasons discussed here:

https://groups.google.com/group/mezzanine-users/browse_thread/thread/20e4680b399ad8e6

from cartridge.

stephenmcd avatar stephenmcd commented on July 30, 2024

Done in e37b521

from cartridge.

Related Issues (20)

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.