[ 
http://jira.nuxeo.org/browse/WEB-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53862#action_53862
 ] 

Radu Darlea commented on WEB-259:
---------------------------------

Contributing (and just contributing meaning defining) a fragment should be 
possible and easy. Indeed, it is a matter to ad extension sections to already 
existing extension points (for models, fragment actions, fragments themselves). 
And this doesn't create any dependency. The addon is using theme engine, it is 
the only dependency.

The only problem I see is the integration of fragment into the theme page used 
by the feature. AFAIK, the theme page is constructed by a contribution in 
feature to the theme engine like
  <extension target="org.nuxeo.theme.services.ThemeService"
    point="themes">
    <theme>
      <src>
        themes/theme-sites-setup.xml
      </src>
    </theme>
  </extension>
If the fragment isn't included in this them setup it is not shown?
Of course, in the addon maybe it is possible to "recontribute" the theme with a 
setup including the feature's one, or even overwriting physically the theme 
setup, but probably this is not acceptable.
Also, I suppose it would be possible to add fragment in theme at runtime 
exactly as theme editor does but I feel this could be bug prone.

Of course we already noticed this opportunity:
- the theme engine doesn't crash when a fragment is not correct
- because of that, we can actually define the fragment in theme-setup but 
without adding models, widgets, actions on it
- the fragment related code (models, widgets, actions) is contributed from addon
- if the addon is deployed, the fragment works ok
- if the addon is not deployed, the fragment fails but the theme engine only 
logs an error and silently ignore it

Another option would be to mix the FreeMarker block inheritance and theme 
fragments approach. It looks promising, so first to try.


> Allow contributing the webengine modules having themes
> ------------------------------------------------------
>
>                 Key: WEB-259
>                 URL: http://jira.nuxeo.org/browse/WEB-259
>             Project: Nuxeo Web Engine
>          Issue Type: User story
>            Reporter: Radu Darlea
>
> The goal is to make possible easily contributing from an addon a new view 
> fragment (being a fragment or an "action") into the webengine modules. The 
> immediate applicability would be to have tag service back as addon and to be 
> possible to use in webeengine-sites without changing the base code.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to