Welcome Guest Search | Active Topics | Members | Log In | Register

Themes Options
tcromer
Posted: Thursday, September 01, 2011 8:59:58 AM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
I have deployed a custom theme that goes along with a custom ME app. Can I also deploy a different custom theme attached to the base ME app?
joe
Posted: Thursday, September 01, 2011 9:48:12 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
I assume you want to no overwrite the OOTB checkbox and dropdown ListStyles for the ME Base app?

If you rename your liststyles to something other than the default, they will not overwrite the defaults ("my.checkbox" instead of "checkbox"). You may just be able to set the ListItemStyle of your controls to the new name, or you may need to use the generic EntreeFormItem for your controls.
tcromer
Posted: Thursday, September 01, 2011 9:52:02 AM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
Well actually what I am trying to do is apply a different icon to the base app then the custom app. The guys here have setup icons on their iPads to the custom app and the base app but when they click the base app icon it changes to the custom app icon I suppose because that icon is setup in the custom theme.
joe
Posted: Thursday, September 01, 2011 10:04:58 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
Hmm, not sure if I'm following. Are you referring to a home screen icon (bookmark) on the iPad?
tcromer
Posted: Thursday, September 01, 2011 10:13:41 AM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
Yeah, they setup this icon on the iPad but once they click it the icon reverts to the icon in the custom theme.
joe
Posted: Thursday, September 01, 2011 10:36:09 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
Is your apple-touch-icon specified in the UA mapping of the theme? There is a way to provide app specific UA mappings, I will have to get back to you on that method.
tcromer
Posted: Thursday, September 01, 2011 10:38:54 AM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
Yes, see below

<?xml version="1.0" encoding="utf-8" ?>
<UserAgentMapping>
<UserAgent match="">
<CSS>
<File name="themecss" href="/_layouts/images/NEA_Theme/theme.css"/>
</CSS>
<Script>
<File name="resetOptions" src="/_layouts/images/NEA_Theme/nea.js"/>
</Script>
<LINK>
<File name="appleIcon" rel="apple-touch-icon" href="/_layouts/images/NEA_Theme/NEAIcon.png" />
</LINK>
</UserAgent>

</UserAgentMapping>
joe
Posted: Thursday, September 01, 2011 11:16:59 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
Ok, so you will want to specify the app icon for the ME Base app in your theme. Then create second UA Mapping file that looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<UserAgentMapping>
<UserAgent match="">
<LINK>
<File name="appleIcon" rel="apple-touch-icon" href="/_layouts/images/NEA_Theme/NEAIcon.png" />
</LINK>
</UserAgent>
</UserAgentMapping>

Then inside your app, there is a method you can override and provide an app specific UA mapping file like this:

public override string PluginPath
{
get
{
return "/_layouts/images/myapp/UAMapping2.xml";
}
}

This is a bit of a trick, as the PluginPath was how we did app specific theming before the Theme API existed.
tcromer
Posted: Thursday, September 01, 2011 11:29:05 AM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
OK, just to be clear about this.

I specify the ME base icon in my current custom theme UAMapping.xml file.

Then I create another UAMapping.xml file with my custom app icon and but that file in my custom theme as well, correct?

Where i do I override the PluginPath method?

joe
Posted: Thursday, September 01, 2011 11:37:41 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
Correct. The PluginPath is defined in your custom app (EntreeApplication class). Chances are, it is already there, but it is currently returning a blank string.

The reason to use the Theme to define the icon for the ME Base app, is because that is the only way you can augment that app's icon. With your custom app, you can use either a theme or the PluginPath method.

Alternativly, you could have your custom app and your base app live on different sites and each site could have a different web-scoped theme applied to it.

Edit: Do not register your 2nd UA Mapping file in the theme
tcromer
Posted: Thursday, September 01, 2011 11:53:25 AM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
Doesn't the UAMapping2.xml file need all the same attributes as the UAMapping.xml file? as shown below

<?xml version="1.0" encoding="utf-8" ?>
<UserAgentMapping>
<UserAgent match="">
<CSS>
<File name="themecss" href="/_layouts/images/NEA_Theme/theme.css"/>
</CSS>
<Script>
<File name="resetOptions" src="/_layouts/images/NEA_Theme/nea.js"/>
</Script>
<LINK>
<File name="appleIcon" rel="apple-touch-icon" href="/_layouts/images/NEA_Theme/NEAIcon.png" />
</LINK>
<UserAgent match="MSIE">
<Script>
<File name="MSIEFix" src="/_layouts/images/NEA_Theme/fixIE.js"/>
</Script>
</UserAgent>
</UserAgent>

</UserAgentMapping>
joe
Posted: Thursday, September 01, 2011 11:55:26 AM

Rank: ME Staff

Joined: 1/12/2009
Posts: 279
Points: 408
Location: VA
no, all UAMapping files are merged, your app will still get all of theme resources (CSS) from the theme but then the apple icon will be overwritten just for your app.
tcromer
Posted: Thursday, September 01, 2011 12:03:46 PM
Rank: Advanced Member

Joined: 4/21/2011
Posts: 30
Points: 90
You guys are AWESOME! thanks
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.