View ID | Mime type | Type |
---|---|---|
DEFAULT | text/html | jelly |
fix-wellformness | text/html | jelly |
done | text/html | jelly |
cancel | text/html | jelly |
error | text/html | jelly |
View ID | Name | Explanations |
---|---|---|
DEFAULT | edit-path | a data repository path. points to the document you want to edit |
<?xml version="1.0"?> <yanel:resource-config xmlns:yanel="http://www.wyona.org/yanel/rti/1.0"> <yanel:rti name="xinha" namespace="http://www.wyona.org/yanel/resource/1.0"/> <yanel:custom-config> <views> <view id="default" type="jelly"> <template>rthtdocs:/xinha.jelly</template> <xslt>/xslt/global.xsl</xslt> <mime-type>text/html</mime-type> </view> <view id="fix-wellformness" type="jelly"> <template>rthtdocs:/xinha-fix.jelly</template> <xslt>/xslt/global.xsl</xslt> <mime-type>text/html</mime-type> </view> <view id="done" type="jelly"> <template>rthtdocs:/xinha-status.jelly</template> <xslt>/xslt/global.xsl</xslt> </view> <view id="cancel" type="jelly"> <template>rthtdocs:/xinha-status.jelly</template> <xslt>/xslt/global.xsl</xslt> </view> <view id="error" type="jelly"> <template>rthtdocs:/xinha-status.jelly</template> <xslt>/xslt/global.xsl</xslt> </view> </views> </yanel:custom-config> </yanel:resource-config>
Once you registered the xinha resource in yanel (add <resource-type src="$XINHA_RESOURCE_HOME" compile="true"/> to yanels resource-types.xml)
your realms resource-config (e.g. /usecases/xinha.yanel-rc) repository
you can access xinha via browser e.g. https://localhost:8443/yanel/$YOUR_REALM/usecases/xinha.html?edit-path=/de/ueber.html.
you have to provide a request parameter "edith-path" in order to allow the xinha resource to know which document to edit.
an example how to add this resource to the menu
Index: src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java =================================================================== --- src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java (revision 31673) +++ src/realms/yanel-website/src/java/org/wyona/yanel/servlet/menu/impl/YanelWebsiteMenu.java (working copy) @@ -61,7 +61,15 @@ sb.append("<ul><li>"); sb.append("<div id=\"yaneltoolbar_menutitle\">Edit</div><ul>"); - sb.append("<li class=\"haschild\">Open with   <ul><li>Source editor</li><li>WYSIWYG editor</li></ul></li>"); + sb.append("<li class=\"haschild\">Open with   "); + sb.append("<ul><li>Source editor</li>"); + sb.append("<li>WYSIWYG editor</li>"); + if (ResourceAttributeHelper.hasAttributeImplemented(resource, "Modifiable", "2")) { + sb.append("<li><a href=\"" + backToRealm + "usecases/xinha.html?edit-path=" + resource.getPath() + "\">Edit page with Xinha   </a></li>"); + } else { + sb.append("<li><a>Edit page with Xinha   </a></li>"); + } + sb.append("</ul></li>"); if (ResourceAttributeHelper.hasAttributeImplemented(resource, "Versionable", "2")) { RevisionInformation[] revisions = ((VersionableV2) resource).getRevisions();