Code Monkey home page Code Monkey logo

Comments (3)

jkoudys avatar jkoudys commented on July 29, 2024

After implementing the form helper, I'm questioning if getThumbnailXhp() type of logic is ever necessary. The naming conventions would get confusing, and it might collide with overrides for the most commonly overridden classes. It's also not always true that one helper == one class.

The entire concept of a 'helper' is completely unnecessary from the view if you're on xhp, so I should be ignoring those. Instead, just define new elements, which may need to reference helper logic if that's the best way to get the data needed.

from concrete5-xhp.

jkoudys avatar jkoudys commented on July 29, 2024

One thing I hadn't considered, is that these images will frequently just be added as style attributes, for when they're set as the background of an element. Perhaps the avatar is a more useful place to start.

from concrete5-xhp.

jkoudys avatar jkoudys commented on July 29, 2024

Added the avatar in a57a40e
It's composed of the element, so any img attributes you add that aren't picked up will fall through to the rendered .

Simply call like:
<c5:avatar user={$ui} aspect-ratio="0.9" />
and it will render the avatar for that user. If no avatar is set, it will fall back to the default image for avatars (same as the ConcreteAvatarHelper.)

from concrete5-xhp.

Related Issues (6)

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.