Sharing a theme - incorrect title etc.

Sharing a theme - incorrect title etc.

I'm trying to have all my apps look the same with a custom theme, so I've created an eSpace and I've got that looking the way I wanted it. I've made its theme and relevant images public as well. There's no functionality in this eSpace - it's just for the theme.

In one of my applications, I've added references to the eSpace with the theme. In design mode, it looks correct with the coloured header with graphics. But when I publish it, the application name of the theme eSpace appears in the title bar and also the application switcher - the GetApplicationName(GetOwnerEspaceIdentifier()) seems to be working incorrectly to what I'd expect - I'd expect it to get the name of the applicationt that's running, rather than the one being referred to.

Any ideas if this is a bug? I don't especially want to have to manually enter the title in each new application's layout if there's a way to avoid this - I'd rather have it automatically picked up if possible.

Hi Iain,

That is how the default themes were designed, where your Application main eSpace has the theme and the modules of the application all show the Application name, instead of themselves.

So that is not a bug, just the default implementation.
But you can change it you want! Just add a input parameter on the layout blocks to recieve the ApplicationName or ApplicationEspaceIdentifier.
Then, when you use the layout block just pass GetApplicationName(GetOwnerEspaceIdentifier()) or GetOwnerEspaceIdentifier() as input value.

João Rosado
Hi, thanks for the reply and your suggestion for solving the problem.

I'm guessing that with your solution above, I'd need to use that parameter on every web screen that I create in the consumer eSpace? Is there any way to set the title in one place in the consumer eSpace so it will then appear on every web screen within that eSpace? Otherwise, I think it'll be a little tedious keep having to add the GetApplicationName(GetOwnerEspaceIdentifier()) on every single page.

Also, I just tried this by putting parameters (for the ApplicationEspaceId and the ApplicationUrl) onto the Layout_Normal in the eSpace containing the theme. That's now triggered a load of errors in that eSpace e.g. in the InternalError web screen, as it's asking for those two parameters to be provided there (presumably because the page depends on the Layout_Normal web block).

Also, I've been having weird problems when trying to run the consumer app, as it keeps failing authentication then throwing me to the theme app login page, which on login sends me to the theme home page rather than the page in the consumer app.

Is this going to be possible to achieve in a clean way? What I really want to be able to do is apply the same look and feel to a bunch of different applications so they function independently (although still using a shared login) and people can switch between them using the application switcher as they're authorised.

Hi João, is there any help you can give me on this one? This is the only issue stopping me releasing our first app. Thanks!
Iain Fogg wrote:
Hi João, is there any help you can give me on this one? This is the only issue stopping me releasing our first app. Thanks!
 Hi Iain,

Sorry I didn't answer before, been very busy lately.
Here is a very basic sample of what I tried to explain.

Basically just some things I did:
  •     Created a new application for the Theme, and just se the "Is Application" to "No" (not really necessary step)
  •     Removed all the Screens and Error handling (Including the MainFlow completly). The Theme eSpace only really needs web blocks.
  •     Removed the Menu block. Assuming each of your applications will have it's own menu.
  •     Added a ApplicationEspaceId input to the Layout_Normal and LoginInfo blocks.
  •     Find all GetOwnerEspaceIdentifier() uses and replaced with ApplicationEspaceId

Now you need to decide what exactly do you want to do with the "MyInfo" link and where should the "Logout" link should go.
In my example I'm going to add 2 extra url inputs for that.

Ok, so the Theme base stuff is there (still all defaults of it anyway :) )
So for each of your Applications:
  •     Create a new application
  •     Use Add Remove References and add the Theme from the other eSpace
  •     On the Current application Theme, set the Base Theme to the referenced one
  •     Delete the local Layout_Popup and Layout_Email, Footer and CommonSideBar (Note if you want to have different sidebars you need to put a placeholder there in the Theme Espace and leave it on the Application eSpaces)
  •     On the local theme change the properties that have setted Layout_Popup and Layout_Email to the Theme eSpace ones.
  •     Now go to each of the local Layout_Normal click Ctrl+A, Delete all content :)
  •     Drag the referenced Layout_Normal  inside the local one
  •     Fill ApplicationEspaceId with GetOwnerEspaceIdentifier()
  •     (Since I solved the MyInfo and Logout with external Urls I created some entry points and set those inputs too)
Almost done! But need to fix the warnings to make Inteliwarp to work:
  •     Open Layout_Normal
  •     Drop 4 placeholders, into the 4 placeholder slots
  •     Name them Menu, Title, MainContent and Actions (respectively)
And its finished!
There won't be any errors or things to fill when you create new screens, if you do a new module based on that application it will share this new theme.

Just remember that not all eSpaces are applications, the thumb rule I like to use is "It's an application if it does not share the menu".
If the menu is the same, then it should be a module of and get the theme from the parent application

So your achitecture should be something like:

Hope this helped.
João Rosado
Here goes the second eSpace
Fantastic, thanks so much - that really helps! I can follow the structure you were referring to now.

I made one small change to get the Application Switcher to work - in the LoginInfo in the CommonTheme, I amended the ESpaceId on the Application Switcher to use the ApplicationId parameter rather than the GetOwnerEspaceIdentifier(), as it was previously showing the name of the theme rather than the name of the application.

Also, I'm using v7 - not sure if there's an issue with it but I noticed that the GetApplicationName method to show the app title in the heading only works if the eSpace is marked as Front Office (or presumably Back Office as well) - if it's just an eSpace within an application, that method returns nothing, so it shows with a blank heading. This sounded like a bug to me - any ideas if that's correct?
Hi Iain,

Yes that is currently the expected behavior of the GetApplicationName method.
It's currently keeping the same behavior as in 6.0. Still not taking full advantage of the new Aplication definitions.

But my example should work fine in that situation, just need to mark the eSpaces that hold the Themes as front offices.
The modules that reference it should work fine.

    -SomeApp  <-- Front Office
<-- Front Office

OK that's great, thanks for clarifying, and for the excellent examples!
Sorry to bring this up again.
It seams that the base theme its only used for the look and feel. If the common theme has a flow for error handling that is not reflected in the consumer themes, and i can't set the error handling of the consumer theme to the one in the common theme (by selecting the reference flow) because i can only select flows of the current espace.

Is there any way to use the same error handling flow in diferent themes in diferent espaces?


Iain Fogg wrote:
OK that's great, thanks for clarifying, and for the excellent examples!
Hi Iain,

Just to let you know that I've posted yet another example about this behavior (in 7.0) at