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
RE: GUI Web Based Fragment Editor
I understand that fragments are still work in progress, however the developer experience is appalling currently when compared to web content templates.Are there any plans for a GUI based fragment editor much like we have for web content structures? Will the fragment editor feature things like code completion and hints and tips as you type? It seems that the UX around fragments right now isn't too encouraging for us to start authoring our own fragments.
At least with web content we have some robust tools and it's also detached from the deployment process. For that reason while fragments could be more powerful, right now it's a lot more challenging to write a fragment than it is to write a web content structure / template.
At least with web content we have some robust tools and it's also detached from the deployment process. For that reason while fragments could be more powerful, right now it's a lot more challenging to write a fragment than it is to write a web content structure / template.
Hey Lee,There is already a GUI Web based fragment editor, so I guess what you are saying is that you would like it to have stronger features and more auto-completion capabilities (currently it auto-completes lfr tags and widgets). We do have quite a few improvements in the roadmap, however as of today we are not making them a priority because most of the feedback we have received is that frontend developers would prefer to use VS Code or whatever tool of choice they have. That's why we are prioritizing investing in the Fragments Toolkit which facilitates doing just that. Apart from the export and import features that it has had from the beginning we have been investing in a very powerful preview feature which provides a realistic preview of a fragment as it's being developed (it autorefresh as the file is saved). This feature sends the code to the server for rendering on the background so it's a fully realistic preview taking into account backend features and theme styling. We will continue to invest in this direction to make for an even better fragment development experience.
For me it's a bit the other way round. We also have build a deployment toolchain for structures/templates and have put a lot of work into a (still) clumsy process.
We found that editing them directly in the frontend is highly problematic. To resolve the issues we had, we created a extra tool here that allows me to sync templates between servers, allowing me to see differences between environments. It happened quite often that changes were done directly in production. Or only on the testsystem and left there to rot, because they were forgotten.
We still use that for hotfixes and to clean them up later. But now we enforce that all templates and structures have to be in git, all changes need to deployed. Sure, Liferay also versions them under the hood, but we never used that. It has some disadvantages, but if you have a large system, it is impossible to manage otherwise.
So, for me the new fragments toolkit is quite THE improvement. We did not really use it so far, we will start the first project in Mai. But with the toolkit we can simply have all code in git. That's the first great thing. And we can use scss and autoprefixing and ECMAScript instead of plain javascript all in one project, together.
I am mentioning this because we currently have two projects for 7.0. One for templates, one for javascript. And some changes often had to be made in the theme. That was the best solution from a technical perspective, but it didn't make sense from a module perspective.
We will probably struggle a bit to find the best practices, but in general we here expect things to improve.
Please note that we don't expect structures/templates to go away, but things will change. Now we have 50 templates. I guess, we will have 5 templates and 20 fragments in the future (I believe, a lot of the templates will become obsolete, since they can be build from smaller fragments).
We found that editing them directly in the frontend is highly problematic. To resolve the issues we had, we created a extra tool here that allows me to sync templates between servers, allowing me to see differences between environments. It happened quite often that changes were done directly in production. Or only on the testsystem and left there to rot, because they were forgotten.
We still use that for hotfixes and to clean them up later. But now we enforce that all templates and structures have to be in git, all changes need to deployed. Sure, Liferay also versions them under the hood, but we never used that. It has some disadvantages, but if you have a large system, it is impossible to manage otherwise.
So, for me the new fragments toolkit is quite THE improvement. We did not really use it so far, we will start the first project in Mai. But with the toolkit we can simply have all code in git. That's the first great thing. And we can use scss and autoprefixing and ECMAScript instead of plain javascript all in one project, together.
I am mentioning this because we currently have two projects for 7.0. One for templates, one for javascript. And some changes often had to be made in the theme. That was the best solution from a technical perspective, but it didn't make sense from a module perspective.
We will probably struggle a bit to find the best practices, but in general we here expect things to improve.
Please note that we don't expect structures/templates to go away, but things will change. Now we have 50 templates. I guess, we will have 5 templates and 20 fragments in the future (I believe, a lot of the templates will become obsolete, since they can be build from smaller fragments).
Hey Christoph,
Thanks a lot for sharing how you use it. I'm glad to hear about it because it's exactly how we envision the toolkit being used
BTW, we see fragments as complementary to web content structures+templates. In fact we have plans to eventually expand the toolkit to support structures and templates as well, but it might be after the 7.3 cycle because we have a lot of other priorities to take care of first.
Thanks a lot for sharing how you use it. I'm glad to hear about it because it's exactly how we envision the toolkit being used

BTW, we see fragments as complementary to web content structures+templates. In fact we have plans to eventually expand the toolkit to support structures and templates as well, but it might be after the 7.3 cycle because we have a lot of other priorities to take care of first.
I agree, both have their value and merits. Webcontent was always clumsy for page content, the user experience was simply bad. Fragments are far better for that usecase. But for things like news or events, dynamic content, (structured) webcontent is perfect.
I always wanted improvements to structured webcontent, one thing I always wanted was a better editor for structured content (not the structure editor, I am talking about the web content editor here). Or more control over it. A simple class field for each field would have helped me tremendously.
Expanding the toolkit to structures is certainly nice, but for me, it is not the burning point. These are all "developer problems". I'd rather have e.g. the ability to connect forms(or the new applications) to webcontent structures.
I am not a big fan of the current forms implementation, especially the validation part. Personally I would throw it away and rebuild the whole editor with fragments, at least the fields. (Note: I am not kidding here! Each field could be a fragment. The page editor could be used to create the form and the "container" element would have to be the "form element)
Anyway, a better experience for editors writing structured content, with more help with validation and autofill for fields, would be very useful. And I would prefer that instead of a better toolchain for fragments.
I always wanted improvements to structured webcontent, one thing I always wanted was a better editor for structured content (not the structure editor, I am talking about the web content editor here). Or more control over it. A simple class field for each field would have helped me tremendously.
Expanding the toolkit to structures is certainly nice, but for me, it is not the burning point. These are all "developer problems". I'd rather have e.g. the ability to connect forms(or the new applications) to webcontent structures.
I am not a big fan of the current forms implementation, especially the validation part. Personally I would throw it away and rebuild the whole editor with fragments, at least the fields. (Note: I am not kidding here! Each field could be a fragment. The page editor could be used to create the form and the "container" element would have to be the "form element)
Anyway, a better experience for editors writing structured content, with more help with validation and autofill for fields, would be very useful. And I would prefer that instead of a better toolchain for fragments.
Hey Christoph,
I agree that the author experience is higher priority. Unfortunately we have been limited in what we could do because we were stuck with an older underlying technology for the structured forms generator (ddm-web). We are close to finishing the transition to a new technology (data engine) which should allow us to make improvements like the ones you mention and more.
I agree that the author experience is higher priority. Unfortunately we have been limited in what we could do because we were stuck with an older underlying technology for the structured forms generator (ddm-web). We are close to finishing the transition to a new technology (data engine) which should allow us to make improvements like the ones you mention and more.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™