|
|
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?
|
|
 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.
|
|
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.
|
|
 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?
|
|
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.
|
|
 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.
|
|
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>
|
|
 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.
|
|
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?
|
|
 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
|
|
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>
|
|
 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.
|
|
Rank: Advanced Member
Joined: 4/21/2011 Posts: 30 Points: 90
|
You guys are AWESOME! thanks
|
|
|
Guest |