You want to insert fields in a article body.
For example you add a gallery to an article but you wan to offer the user to use this gallery in the body of the article.
Having a button in editor just like module, article etc for inserting a plug-in value or label+value but of course the field is not render like "normally" with turning him off in option.
Fields are only display before/after titles and body.
J!3.7A2
Labels |
Added:
?
|
I wouldn't say that I'm driving it, I merely wrote a simple parser that would solve the problem without introducing the bloat associated with Mustache or Twig. In my opinion, all we need is a simple parser and let JLayout do the rendering. Others wanted to use a third-party library which does both (and then add JLayout into the mix as well). Opinions differ and no decision has been made.
See #11702 for the details. The PR also includes a refactoring of the loadmodule plugin to use the new parser.
This is an important decision because whatever parser we settle on will naturally tend to become the de facto standard for Joomla going forward, not just for Custom Fields, but for all extensions that need to parse and render embedded codes.
Actually, I think it would be enough to have a simple content plugin where you can select the field you want to insert and it then creates a tag like we have in other cases. Eg {field=15} where 15 is the ID of the field (selected from a modal). The content plugin then replaces that with the respective field. But maybe I'm thinkingto simple here and miss the complex part. I haven't tried it yet
I think so. Having a full rendering of the fields seems complicated (cool but complicated). My concern with a full rendering : what code will be included in the editor ? the {tag_fields} when we look at the source tab and the full render in the wysiwyg section ?
I suggest to try out DPFields for a demo, there the rendering functionality is still included. An editor button is shipped as well which inserts a field into the description. The documentation about that part can be found here https://joomla.digital-peak.com/documentation/162-dpfields/2750-rendering-fields. Me and many users of DPFields do like that functionality.
@Bakual Yes, that's what I was trying to achieve with #11702
I think Mustache is overkill (and isn't even a perfect fit as some additional code needed to be wrapped around it anyway) because it is trying to do the rendering as well as the parsing. I would argue that we only need a simple parser and let JLayout take care of the rendering. Nothing more. At least not in J3.
@SemaphoreOxalis can this Issue can be closed because of PR?
Closing as we now have both plugins merged.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-05 12:17:43 |
Closed_By | ⇒ | Bakual |
We have that in DPFields and also in com_fields at the beginning. Then some people decided to make our own one parser and skip Mustache as template engine. Actually @chrisdavenport is the driver behind that, but it is still not finished yet. Perhaps he can tell more about the status.
I'v kicked out templating for fields and opened a new PR joomla-projects/custom-fields#135, just that we have the reference how the functionality would look like. For me this is a very handy functionality but people have not been in favor of using Mustache.