cancel
Showing results for 
Search instead for 
Did you mean: 

How does user profile get called ?

michaelc
Champ on-the-rise
Champ on-the-rise
Trying to understand the linkage a little.

   I see how you create a dashlet now, but how does a page URL get defined.
   I see in my.profile.html.ftl
        <a href="${url.context}/page/user/${user.name?url}/profile" class="theme-color-1">${msg("link.viewFullProfile")}</a>

   I see \components\profile what looks like the user profile page, so how is this linkage done ?
  
   I don't see it at the moment
5 REPLIES 5

zladuric
Champ on-the-rise
Champ on-the-rise
${msg("link.viewFullProfile")} are strings from the dashlet.get.properties files.
${url}, ${user} and other things are root objects created by the /share application.
You have the controler script in dashlets, you can add new root objects there. Ie:

dashlet.get.js (the controler script):
var someVar = getInformationFromRepository(); // this would be a function that calls some alfresco webscript and gets back info
model.someVar = someVar;

Then you would have the "someVar" object available in the freemarker, ie:
dashlet.get.html.ftl:

<div name="result"> Here is the result: ${someVar} </div>

That is how it's basically all done. Some root objects (like url, user and similar) are created by default, some you create on your own.

Is that what you mean?

michaelc
Champ on-the-rise
Champ on-the-rise
No, I guess that I did not make myself clear sorry.

This from kev's blog and helped me a lot
   http://blogs.alfresco.com/wp/kevinr/2010/01/28/alfresco-share-33-extensions-and-springsurf/

   It looks like for a site based page I define in alfresco/site-data/pages an xml file with an id.
   in this example he has siteprofile.

    but how does non-site specific pages like user profile work ?  
     it does not seem to follow the same pattern.
  
   Having some trouble wrapping my arms around the framework for share.

zladuric
Champ on-the-rise
Champ on-the-rise
Hmm, I just ran into (pursuing other things) Share/WEB-INF/classes/alfresco/templates/org/alfresco/dashboard.ftl and Share/WEB-INF/classes/alfresco/templates/org/alfresco/include/alfresco-template.ftl with things like:
<script type="text/javascript">//<![CDATA[
      Alfresco.constants.DEBUG = ${DEBUG?string};
      Alfresco.constants.PROXY_URI = window.location.protocol + "//" + window.location.host + "${url.context}/proxy/alfresco/";
      Alfresco.constants.PROXY_URI_RELATIVE = "${url.context}/proxy/alfresco/";
      Alfresco.constants.PROXY_FEED_URI = window.location.protocol + "//" + window.location.host + "${url.context}/proxy/alfresco-feed/";
      Alfresco.constants.THEME = "${theme}";
      Alfresco.constants.URL_CONTEXT = "${url.context}/";
      Alfresco.constants.URL_PAGECONTEXT = "${url.context}/page/";
      Alfresco.constants.URL_SERVICECONTEXT = "${url.context}/service/";
      Alfresco.constants.URL_FEEDSERVICECONTEXT = "${url.context}/feedservice/";
      Alfresco.constants.USERNAME = "${user.name!""}";
   //]]></script>

Is that more helpfull?

mikeh
Star Contributor
Star Contributor
All the linkage is done in the site-data folder. You'd do well to buy our Wrox "Professional Alfresco" book which covers in detail exactly what you're asking.

Thanks,
Mike

michaelc
Champ on-the-rise
Champ on-the-rise
All the linkage is done in the site-data folder. You'd do well to buy our Wrox "Professional Alfresco" book which covers in detail exactly what you're asking.

Thanks,
Mike

It covers 3.3 ?
I looked at in the book store a while ago and it seemed to just touched on share and surf, I could be wrong.
I need to check it out again.

I pick up Alfresco 3 Enterprise Content implementation ( packit ), still working thru the book and it's examples.