cancel
Showing results for 
Search instead for 
Did you mean: 

Help: customizing explorer

sbudrez
Champ in-the-making
Champ in-the-making
Hi to all!

I have downloaded and istalled alfresco community edition 3.2
I've read the "tutorial" (the .pdf file named "Getting_Started_with_Explorer_DM_for_Alfresco_Community_Edition_3_2") and learned the basic customizations (like creating spaces or content rules). I was wondering if there's a way to do this operation outside alfresco itself, for example editing text in some kind of configuration file. Is this possible?

Thanks for any help  :roll:
24 REPLIES 24

sbudrez
Champ in-the-making
Champ in-the-making
Anyway, I'm proceeding with my tutorial process  Smiley Happy
Now i have created a "web-client-config-custom.xml" and a "webclient.properties" file in my extension folder
It all works fine, except that i can't see the new properties i've defined (published, active?, product, version) of my documents in the properties window (i've created a content of the new "whitepapre" type). The only new thing i can see is a "product realted" property.

Here are the files:

webclient.properties:
#sc:webable
published=Published
isActive=Active?
#sc:productRelated
product=Product
version=Version

web-client-config-custom.xml:
<alfresco-config>
    <!– add webable aspect properties to property sheet –>
    <config evaluator="aspect-name" condition="sc:webable">
        <property-sheet>
            <show-property name="sc:published" display-label-id="published" />
            <show-property name="sc:isActive" display-label-id="isActive" read-only="true" />
            <show-association name="sc:relatedDocuments" />
        </property-sheet>
    </config>

    <!– add product related aspect properties to property sheet –>
    <config evaluator="aspect-name" condition="sc:productRelated">
        <property-sheet>
            <show-property name="sc:product" display-label-id="product"/>
            <show-property name="sc:version" display-label-id="version" read-only="true"/>
        </property-sheet>
    </config>

    <!– show related documents association on doc property sheet –>
    <config evaluator="node-type" condition="sc:doc">
        <property-sheet>
            <show-association name="sc:relatedDocuments"/>
        </property-sheet>
    </config>

    <!– show related documents association on whitepaper property sheet –>
    <config evaluator="node-type" condition="sc:whitepaper">
        <property-sheet>
            <show-association name="sc:relatedDocuments"/>
        </property-sheet>
    </config>

    <!– add someco types to add content list –>
    <config evaluator="string-compare" condition="Content Wizards">
        <content-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
        </content-types>
    </config>

    <config evaluator="string-compare" condition="Action Wizards">
    <!– The list of aspects to show in the add/remove features action –>
    <!– and the has-aspect condition –>
        <aspects>
            <aspect name="sc:webable"/>
            <aspect name="sc:productRelated"/>
        </aspects>

    <!– The list of types shown in the is-subtype condition –>
    <subtypes>
        <type name="sc:doc" />
        <type name="sc:whitepaper" />
    </subtypes>
   
    <!– The list of content and/or folder types shown in the specialise-type action –>
        <specialise-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
        </specialise-types>
    </config>

    <config evaluator="string-compare" condition="Advanced Search">
        <advanced-search>
            <content-types>
                <type name="sc:doc" />
                <type name="sc:whitepaper" />
            </content-types>
            <custom-properties>
                <meta-data aspect="sc:webable" property="sc:published" display-label-id="published" />
           <meta-data aspect="sc:webable" property="sc:isActive" display-label-id="isActive" />
                <meta-data aspect="sc:productRelated" property="sc:product" display-label-id="product" />
                <meta-data aspect="sc:productRelated" property="sc:version" display-label-id="version" />
            </custom-properties>
        </advanced-search>
    </config>

</alfresco-config>

norgan
Champ in-the-making
Champ in-the-making
Beware not to mess up hot deployment via Alfresco Explorer GUi and eclipse deployment into the webapps folder. Those will override the web-uploads.

sbudrez
Champ in-the-making
Champ in-the-making
I haven't understand quite a single word  Smiley Indifferent
What do you mean with "hot deployment via Alfresco Explorer GUi"?
And with "eclipse deployment into the webapps folder"?

As i said before I am really a novice, can you speak as simple as possible please?

norgan
Champ in-the-making
Champ in-the-making
Ok, sorry, Ill back up a bit.

— eclipse —
Eclipse is an open developement envorinment framework, you can use to develope software for Alfresco. it offers
* Freemarker Editor plugin
* Javascript/java/xml Editors including (some) syntax checking and code-completion (ctrl + space)
* validation of XML files (for missing endtags, for instance)
* graphical workflow designer for advanced workflows

Jeff potts (ecmarchitect.com) offers code samples for the developer series tutorials, which can be imported into eclipse, allowing you to automate the deployment (copying files to the correct location). This way, you can play with the samples and push a button to send your files over to your system.

If you really want to start with Alfresco, you should,BTW, get yourselve a copy of the "Alfresco Developer Guide" (see Alfresco Wiki under "The Guide"), which is even more elaborate than the online tutorials.

— Hot deployment —
you can
* create an AMP file
* edit directly in the webapps/alfresco path
* copy the changed files to webapps/alfresco (e.g. via zip file expansion)
* use Alfresco Explorer webgui to upload the files (thats what I mean with hotdeployment). But this only works, if files with similar name weren't already deployed in one of the other ways.)

— Novice  —
No problem Smiley Happy Just as long as you give credit, read wiki & forum and think before asking (as you seem to be doing  :!: ) the people here are quite willing to help. The thing is, however - beeing a novice to Alfresco is one thing, but you should have a programming background on java, php or javascript, if you want to do some serious customizing.

Good hunting,
Norgan

sbudrez
Champ in-the-making
Champ in-the-making
Hhmm… lot of stuff!

Well maybe it's better to explain my situation:
I'm a student and I'm working with alfresco for my thesis. My goal is to customize an ECM starting from an ontology (but this goes out of theme for this forum  Smiley Happy )

As you mentioned, is impossible to do this all without some programming background. I have learned a littel bit of Java earleir in my studies (using NetBeans), but I surely have to take a look back at it because I've done it some years ago…

But before entering in the java world (or eclipse or whatever) I would like to get things working witht the first basic part of alfresco customization: the XML files mentioned by Jeff Potts int he first developer series tutorials ("Alfresco Developer: Working with Custom Content Types"). I'm getting a little problem with that, and I hope that you might give me some help.

As I said before, it all works fine except that I can't see the new properties I've defined (published, active?, product and version; as it is graphically shown in the developer giude) in the properties window of the new document types (for example a whitepaper). The only new property i can see is a mysterious "product related" property.
I've tried to investigate the reasons for this, but I can't figure what's wrong.

At the end of the article (under: "Where to find more information") I found the complete source code for the examples (I always find these useful infos too late  :x ). I have take the files under the extension directory and copied it into my alfresco extension directory, but i get the same problem exposed before. The only file among these 5 not mentioned in the developer guide is the "webserviceclient.properties" file, but I exclude it might be somehow related to my property problem.
What could be the problem in your opinion?

norgan
Champ in-the-making
Champ in-the-making
Hi,
the configuration, which fields are displayed, is done in the web-client-custom-config.xml. And the key to that file are the conditionals on top. See http://forums.alfresco.com/en/viewtopic.php?f=10&t=22124&p=73347#p73347 for a first explanation.

For instance, if you do a custom folder type, icon-selection will only allow for the "default blank" icon. You have to copy & modify the "cm:folders icons" section for your custom type. So for every type you create, you have to define exactly which fields you want to show (and dont forget parent-inherited fields and aspects added to the type )

Norgan

sbudrez
Champ in-the-making
Champ in-the-making
Ok
I think i've understand the mechanic of the web-client-custom-config.xml file

Anyway, as I said before, i've just used the files from the "complete source code for the examples" of the developer guide form ecmarchitecht. As you said, the example were working correcty to you, but in my case they don't.
Here is my web-client-custom-config.xml:

<alfresco-config>
    <!– add webable aspect properties to property sheet –>
    <config evaluator="aspect-name" condition="sc:webable">
        <property-sheet>
            <show-property name="sc:published" display-label-id="published" />
            <show-property name="sc:isActive" display-label-id="isActive" read-only="true" />
        </property-sheet>
    </config>

    <!– add product related aspect properties to property sheet –>
    <config evaluator="aspect-name" condition="sc:productRelated">
        <property-sheet>
            <show-property name="sc:product" display-label-id="product"/>
            <show-property name="sc:version" display-label-id="version" read-only="true"/>
        </property-sheet>
    </config>

    <!– show related documents association on doc property sheet –>
    <config evaluator="node-type" condition="sc:doc">
        <property-sheet>
            <show-association name="sc:relatedDocuments"/>
        </property-sheet>
    </config>

    <!– show related documents association on whitepaper property sheet –>
    <config evaluator="node-type" condition="sc:whitepaper">
        <property-sheet>
            <show-association name="sc:relatedDocuments"/>
        </property-sheet>
    </config>

    <!– add someco types to add content list –>
    <config evaluator="string-compare" condition="Content Wizards">
        <content-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
        </content-types>
    </config>

    <config evaluator="string-compare" condition="Action Wizards">
    <!– The list of aspects to show in the add/remove features action –>
    <!– and the has-aspect condition –>
        <aspects>
            <aspect name="sc:webable"/>
            <aspect name="sc:productRelated"/>
        </aspects>

    <!– The list of types shown in the is-subtype condition –>
    <subtypes>
        <type name="sc:doc" />
        <type name="sc:whitepaper" />
    </subtypes>
   
    <!– The list of content and/or folder types shown in the specialise-type action –>
        <specialise-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
        </specialise-types>
    </config>

    <config evaluator="string-compare" condition="Advanced Search">
        <advanced-search>
            <content-types>
                <type name="sc:doc" />
                <type name="sc:whitepaper" />
            </content-types>
            <custom-properties>
                <meta-data aspect="sc:webable" property="sc:published" display-label-id="published" />
           <meta-data aspect="sc:webable" property="sc:isActive" display-label-id="isActive" />
                <meta-data aspect="sc:productRelated" property="sc:product" display-label-id="product" />
                <meta-data aspect="sc:productRelated" property="sc:version" display-label-id="version" />
            </custom-properties>
        </advanced-search>
    </config>

</alfresco-config>

The problem is that with this file i can't see the new properties (published, isActive, product, version) in the properties window of the new document types (for example a whitepaper).

jck
Champ in-the-making
Champ in-the-making
Hi,
download the SIDE-Labs open source environment on http://www.side-labs.org

It is a set of graphical tools to help developers to produce Alfresco applications easily, without the need to write a single line of xml code. The generator will take care of generating the right xml file at the right location.

JC

sbudrez
Champ in-the-making
Champ in-the-making
Ok i now am trying to install SIDE
I follow the instruction found here http://www.side-labs.org/wiki/index.php/Documentation:User:Installation
But at figure 4.5, i can't find the correct wizard. I don't have "S-IDE Modeler" on the list, only "SIDE", which contains no "Class Diagram"

Any ideas about this difference?

jck
Champ in-the-making
Champ in-the-making
Hi sbudrez,
have you got a Data Diagram?

Class diagram have been replaced by Data diagram and SIDE-Labs by SIDE.

We're going to update the wiki. Thanks for the feedback,

HTH,

JC