11-12-2010 05:46 PM
<!– Global config section –>
<config replace="true">
…
<header>
<app-items>
…
<item type="link" id="test-site" label="Test Site" icon="sites.png">/site/test/documentlibrary</item>
…
</app-items>
…
</header>
</config>
That worked, but the following is what I really want to do, but haven't had success with yet.
<config evaluator="string-compare" condition="UriTemplate" replace="true">
<uri-templates>
<uri-template id="sitedashboardpage">/site/{site}/dashboard</uri-template>
<!– Adding the uri template below in at attempt to change the urls on the site menu making them go directly to the document library. –>
<uri-template id="sitedocumentlibrarypage">/site/{site}/documentlibrary</uri-template>
<uri-template id="sitepage">/site/{site}/{pageid}</uri-template>
<uri-template id="userdashboardpage">/user/{userid}/dashboard</uri-template>
<uri-template id="userpage">/user/{userid}/{pageid}</uri-template>
<uri-template id="userprofilepage">/user/{userid}/profile</uri-template>
<uri-template id="userdefaultpage">/user/{pageid}</uri-template>
<uri-template id="consoletoolpage">/console/{pageid}/{toolid}</uri-template>
<uri-template id="consolepage">/console/{pageid}</uri-template>
</uri-templates>
</config>
2. Next, I changed the _renderFavouriteSites function in /modules/header/sites.js file like this:
…
_renderFavouriteSites: function Sites__renderFavouriteSites()
{
…
for (i = 0, ii = sites.length; i < ii; i++)
{
sitesMenu.addItem(
{
text: $html(this.options.favouriteSites[sites[i]]),
/* Using my new sitedocumentlibrarypage uri template instead of sitedashboardpage */
url: Alfresco.util.uriTemplate("sitedocumentlibrarypage",
{
site: sites[i]
})
}, 0);
}
…
},
…
I know I should have done #2 above in a new javascript file and then added it to the dependencies, but this is a test at this point.11-12-2010 07:00 PM
11-14-2010 06:07 PM
11-15-2010 03:46 AM
<!– Global config section –>
<config replace="true">
<flags>
<!–
Developer debugging setting to turn on DEBUG mode for client scripts in the browser
–>
<client-debug>true</client-debug>
<!–
LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
This flag automatically activates logging on page load.
–>
<client-debug-autologging>false</client-debug-autologging>
</flags>
</config>
11-15-2010 01:30 PM
03-07-2012 05:48 AM
/**
* Event callback when dialog template has been loaded
*
* @method onTemplateLoaded
* @param response {object} Server response from load template XHR request
*/
onTemplateLoaded: function Sites_onTemplateLoaded(response)
{
// Inject the template from the XHR request into a new DIV element
var containerDiv = document.createElement("div");
containerDiv.innerHTML = response.serverResponse.responseText;
document.body.insertBefore(containerDiv, document.body.firstChild);
this.widgets.sitesButton = new YAHOO.widget.Button(this.id,
{
type: "menu",
menu: this.id + "-sites-menu",
lazyloadmenu: false
});
this._renderFavouriteSites();
},
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.