
h1. Edit and View Mode Configuration


h2. With the *Edit* mode

In the portlet.xml file
{code}
<portlet>
    <description xml:lang="EN">Fast Content Creator</description>
    <portlet-name>FastContentCreatorPortlet</portlet-name>
    <display-name xml:lang="EN">Fast Content Creator</display-name>
    <portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>

    <init-param>
      <name>webui.configuration</name>
      <value>/WEB-INF/conf/portlet/ecm/FastContentCreatorPortlet/webui/configuration.xml</value>
    </init-param>

    <expiration-cache>0</expiration-cache>
    <supports>
      <mime-type>text/html</mime-type>
      <portlet-mode>help</portlet-mode>
      <portlet-mode>edit</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <resource-bundle>locale.portlet.ecm.FastContentCreatorPortlet</resource-bundle>

    <portlet-info>
      <title>Fast Content Creator</title>
      <short-title>ECM Fast Content Creator</short-title>
      <keywords>ecm, fastcontentcreator</keywords>
    </portlet-info>
    <portlet-preferences>
   <!-- Setup the default repository name for fast content creator portlet -->
     <preference>
        <name>repository</name>
        <value>repository</value>
        <read-only>false</read-only>
      </preference>
      <!-- Specify the workspace name will be use in repository -->
      <preference>
        <name>workspace</name>
        <value>collaboration</value>
        <read-only>false</read-only>
      </preference>
      <!-- Specify the destination path which will be use to store saved documents -->
      <preference>
        <name>path</name>
        <value>/Groups/platform/users/Documents</value>
        <read-only>false</read-only>
      </preference>
      <!-- Specify the node type of document which will be show on the dialog form -->
      <preference>
        <name>type</name>
        <value>exo:article</value>
        <read-only>false</read-only>
      </preference>
    </portlet-preferences>
  </portlet>
{code}
<br>
In configuration.xml file
{code}
<webui-configuration>
  <annotation-classes>
  </annotation-classes>
  <application>
    <ui-component-root>org.exoplatform.ecm.webui.component.fastcontentcreator.UIFastContentCreatorPortlet</ui-component-root>
    <state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
  </application>
</webui-configuration>
{code}
<br>




h2. With the *View* mode

In  portlet-preferences.xml file
{code}
<portlet-preferences>
    <owner-type>group</owner-type>
    <owner-id>platform/users</owner-id>
    <window-id>group#platform/users:/ecm/FastContentCreatorPortlet/fastcontentcreator</window-id>
    <preference>
        <name>repository</name>
        <value>repository</value>
        <read-only>false</read-only>
      </preference>
      <preference>
        <name>workspace</name>
        <value>collaboration</value>
        <read-only>false</read-only>
      </preference>
      <preference>
        <name>path</name>
        <value>/Groups/platform/users/Documents</value>
        <read-only>false</read-only>
      </preference>
      <preference>
        <name>type</name>
        <value>exo:article</value>
        <read-only>false</read-only>
      </preference>
   </portlet-preferences>
{code}
<br>
In pages.xml file
{code}
<page>
   <page-id>group::platform/users::FastContentCreator</page-id>
   <owner-type>group</owner-type>
    <owner-id>platform/users</owner-id>
    <name>FastContentCreator</name>
    <access-permissions>*:/platform/users</access-permissions>
    <edit-permission>manager:/platform/administrators</edit-permission>

    <application>
      <instance-id>group#platform/users:/ecm/FastContentCreatorPortlet/fastcontentcreator</instance-id>
      <title>Fast Content Creator</title>
      <show-info-bar>true</show-info-bar>
      <show-application-mode>true</show-application-mode>
    </application>
  </page>
{code}
<br>
In navigation.xml file
{code}
<page-nodes>
   <node>
<node>
      <uri>contentmanagement/fastcontentcreator</uri>
      <name>fastcontentcreator</name>
      <label>#{platform.users.content-creator}</label>
      <page-reference>group::platform/users::FastContentCreator</page-reference>
    </node>
</node>
  </page-nodes>
{code}


