Comments (3)
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concrete5-xhp.