Mono Support Chrome Problen.. (Closed)

Viewed 15242 time(s), 3 post(s), 8/9/2011 6:49:49 PM - by shawndg
8/9/2011 6:49:49 PM
1871 Reputation 252 Total posts

I created a chrome file.. and pointed my webpart content zone to it.

Now I can seem my chrome working when im logged in but when im not I cant see it at all..

Im not sure.. I played with the global settings.. show title, and show chrome for all users.

I even set the default, title and border, etc properties of each web part but I am still unable to see my chrome when not logged in ?

I have it coded into a aspx page like so..

<portal:PortalWebPartZone HeaderText='CenterZone' ID="CenterZone" runat="server" Width="100%" ChromeTemplateFile="TPSHeading.htm">
<ZoneTemplate>
</ZoneTemplate>
</portal:PortalWebPartZone>

the TPSheading.html file code:

<div>
<div class="web-part-title" id='<# WebPartDragSurfaceId #>'>

<div class="header_box"><h98><# WebPartTitle #></h98></div>

</div>
<div class="web-part-body"><# WebPartBody #></div>
<div class="web-part-verbs"><# WebPartVerbs #></div>
</div>


But i still don't get why it only is working when im logged in.. the web part shows all the time.. but chrome only shows when logged in.

1
8/9/2011 8:44:43 PM
7207 Reputation 956 Total posts

Hi Shawn,
it looks OK; the property ShowChromeForNonAdmins should be additionally set to true on the PortalWebPartZone, and reading your post I assume that you've already tried it, but please confirm.
By default, web part chrome is not shown to all users since its main purpose is to hold web part title and verbs, the elements which are usually not shown to all users. This property should make it visible for all. Which parts are placed in your zone?

2
8/11/2011 4:11:41 PM
7207 Reputation 956 Total posts

After speaking to you, I understand that you want to show different chrome for admins and non-admins. It is not difficult:

protected void Page_Init(object sender, EventArgs e)
{
    if (MonoSoftware.MonoX.Utilities.SecurityUtility.IsAdmin())
        myPartZone.ChromeTemplateFile = "/App_Templates/MyTheme/ChromeTemplates/MyChrome.htm";
else
        myPartZone.ChromeTemplateFile = "/App_Templates/MyTheme/ChromeTemplates/AnotherChrome.htm";   
}

3
This is a demo site for MonoX. Please visit Mono Software for more info.