Planned maintenance is scheduled for the week of June 15th - the exact date and time will be announced soon.
See More Details
Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
(How) is yeoman generated sample fragment color choice supposed to work?
i created a fragments project with yeoman. in the page editor it shows a color choice but that color has no effect.
i quickly found two ways to make it work but which is the correct approach?
1. change html:
<div class="sample-fragment">
- <h1>
+ <h1 style="color: ${configuration.textColor.rgbValue}">
<lfr-editable id="title" type="text">
Sample fragment
</lfr-editable>
</h1>
</div>
2. (alternative) change js
console.group('Sample fragment');
console.log('fragmentElement', fragmentElement);
console.log('configuration', configuration);
+fragmentElement.style.color = configuration.textColor.rgbValue;
console.groupEnd();
i have not found so far a document that describes how that should work. glad for any hint.
setup details:
created a sample fragments project with "generator-liferay-fragments": "1.9.1"
yarn global add yo generator-liferay-fragments
yo liferay-fragments
yarn run import
and docker run ... liferay/portal:7.4.0-ga1
Community
Company
Feedback