MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Chrome Problen.. (Closed) (Mono Support )

Viewed 8347 time(s), 3 post(s) 8/9/2011 6:49:49 PMby shawndg
shawndg

shawndg

8/9/2011 6:49:49 PM
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.

This content has not been rated yet. 
1871 Reputation 252 Total posts
denis

denis

8/9/2011 8:44:43 PM
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?
This content has not been rated yet. 
7207 Reputation 956 Total posts
denis

denis

8/11/2011 4:11:41 PM

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";   
}

This content has not been rated yet. 
7207 Reputation 956 Total posts