Recreation of theme module.

Recreation of theme module.

  

Hi, All

Earlier my whole application was in one module, now  I have to create the separate modules for my application.

Is it possible to create theme module separately where I can put all my style-sheet sheet and custom layout?


Regards




Hi Pankaj,

I think commonly no one create separate module for theme. But Yes, you can create new module for theme.

You just need to add theme and custom layout to new module, set public property to true, add reference of that model where you want to add that layout/css  and use it.

To do this follow the process

1) Add new module

2) Goto theme folder, right click, add theme

3) set public property to yes (this will allow you to access this theme outside of current module)

4) Go to another module, where you want to add recently created theme

5) add reference of theme module and make sure you check theme while adding reference

6) Now in your theme folder you can see that theme & you can use that.

Do the same for custom layout

Hi, Gopal

I have done the same thing but my CSS is not rendering from my theme module. 

Regards,

Pankaj


Hi Pankaj,

why do you need a module to have the theme in the app itself? Instead in a generic way and with the best practice, you can create a live style guide and have your themes and patterns in it. That way you can reference it in your app or other apps to adhere with generalization thus creating a conceptual model :)

Debasis Sahoo wrote:

Hi Pankaj,

why do you need a module to have the theme in the app itself? Instead in a generic way and with the best practice, you can create a live style guide and have your themes and patterns in it. That way you can reference it in your app or other apps to adhere with generalization thus creating a conceptual model :)

Hi, Debu,

I need a custom layout, I don't want to use any of the themes that outsystems provides and I want to place it outside of other modules. and as you said live style guide is just for the look and feel for a specific theme that our systems provide.


Regards

PAnkaj


Gopal Jite wrote:

I think commonly no one create separate module for theme. But Yes, you can create new module for theme.

I have to very much disagree with this. If you have anything but a very small application with just a single eSpace containing screens, you will definitely want to create a seperate eSpace that contains the Theme, and possibly other supporting stuff like exception handling and common web blocks.

Kilian Hekhuis wrote:

Gopal Jite wrote:

I think commonly no one create separate module for theme. But Yes, you can create new module for theme.

I have to very much disagree with this. If you have anything but a very small application with just a single eSpace containing screens, you will definitely want to create a seperate eSpace that contains the Theme, and possibly other supporting stuff like exception handling and common web blocks.


Kilian, i am agreed with this, I have done this practice for so many projects where I initially worked but right now m working on a project which is developed before I started working on, so what I believe is when we create the first module for our project is by default a theme module.

Plese, correct me if m wrong.


Regards

Pankaj

Hi Pankaj,

Every eSpace you create that is not a blank one will have its own theme by default, iirc. So you can just remove that if you don't need it and reference the proper one. (It should be possible I think to specify the theme that's automatically added to a new eSpace, but I'm not quite sure how to do that.)

Kilian Hekhuis wrote:

Hi Pankaj,

Every eSpace you create that is not a blank one will have its own theme by default, iirc. So you can just remove that if you don't need it and reference the proper one. (It should be possible I think to specify the theme that's automatically added to a new eSpace, but I'm not quite sure how to do that.)

Hum...

I think this will happens only if the application does not have any responsive module defined as "home".
If there is a responsive module defined as home, any new module will inherits from it, like this:


In this case, I have a responsive module called "Tests", that has its own theme (Tests). When I create Tests3, after setting Tests to be the home module, it inherits its theme (giving another name, but it's still the theme of the Tests, and no Common. All the default web blocks, layouts, theme styles, etc, comes from Tests.

As far as I know (and I may be wrong), "complete" responsive module, with its own theme, is created only when there is no other responsive theme marked as home in the application.

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Kilian Hekhuis wrote:

Hi Pankaj,

Every eSpace you create that is not a blank one will have its own theme by default, iirc. So you can just remove that if you don't need it and reference the proper one. (It should be possible I think to specify the theme that's automatically added to a new eSpace, but I'm not quite sure how to do that.)

Hum...

I think this will happens only if the application does not have any responsive module defined as "home".
If there is a responsive module defined as home, any new module will inherits from it, like this:


In this case, I have a responsive module called "Tests", that has its own theme (Tests). When I create Tests3, after setting Tests to be the home module, it inherits its theme (giving another name, but it's still the theme of the Tests, and no Common. All the default web blocks, layouts, theme styles, etc, comes from Tests.

As far as I know (and I may be wrong), "complete" responsive module, with its own theme, is created only when there is no other responsive theme marked as home in the application.

Cheers,
Eduardo Jauch

Hi, Eduardo,

Thanks for the reply, so you mean that I have to set my newly created theme module as home and so it will become available for all module as a base theme.


Regards,

Pankaj


Pankaj Pant wrote:

Hi, Eduardo,

Thanks for the reply, so you mean that I have to set my newly created theme module as home and so it will become available for all module as a base theme.


Regards,

Pankaj


Yes and no. lol

The idea of setting the Theme module as Home, initially at least, is to enable this automatic setting of new responsive modules that inherits from the Theme module.

Any module already created, you have to set the references to the Theme and set the module theme to use the theme of the Theme module, manually. Worst. If there are changes of layout, ect, you have to manually change everything on each page.

Depending on the size of the project it is no small task.

I don't know if there is something in the Forge that can help "moving" things from one module to other, because usually this means you will end up with references to the old module...