Update module to pick up template changes

Update module to pick up template changes

  

I followed the doc guide from here: Create a Template

My template showed up in the list when creating a new application and the module created in the new app picked up the template just fine. 

I decided I wanted to change some colors and other styling on the template, so I opened the Template_ application and made the changes. I saved/published the changes successfully. However, when I open the other application that uses the template, the color/style changes don't reflect (it's still the "original" version). How can I refresh the template used in the application after making changes to the Template_ application?

Hi Joseph,

Go to the application where you are using this template.

Click on manage dependencies

click on Refresh All and then Ok. If refresh all is disabled, then just click ok

Publish the modules. You should see new changes.

Hello,

Just to add to Suraj's answer.

When you don't change "public" elements in the module being consumed, the "Refresh All" and "Refresh Icon" will not be enabled. 

To make your module use the newest version of the producer module, all you need to do is to Publish again the Consumer. 

There is really no need to open the Manage Dependences. Publishing the module from Service Center, for example, will work as well. 

If there is any "incompatibility", publishing a module will ask you to refresh dependences, so you know if there is any kind of breaking change in the producer.

Cheers.

Hi Eduardo,

Thanks for this tip. There is really no need to open the Manage Dependences. Publishing the module from Service Center, for example, will work as well.

But I think if someone is working on the project, he/she will not go to the Service Center to publish the module. Also not all development team has rights to publish from the Service Center. They often need to go to the Platform management team. So I think it would be good to refresh the references when we are in development phase.

Thanks and Regards,

Suraj Borade

Hi Suraj,

What I meant was that you don't need to refresh the dependences on purpose. You can keep working and just publish the module. As soon as the module is published, it will use the new version of the producer. 

Cheers.

Thanks for the replies, guys. The problem I am/was having is that the template wasn't actually a dependency. The application/module was being created based off of the template, not being dependent of the template. Reading the doc guide more closely, there was a line that I apparently overlooked the first time through. It states:


"Once an application is created based on a template, further changes to the template will not impact this same application."


So that pretty much answers my question. I need to create the application/modules using the base/default template and then make my template a dependency instead of building the application/module based off of the template. That should then allow me to manage dependencies and grab updates on publish as you both have indicated.


Thanks!

Hi Guys,

I guess here we have a misunderstood about Templates and Themes.

Usually when we create a Template_XXX, according documentation, the best practice is to keep the theme in one module and template making reference to it.

When we create an application from template, the platform will clone the template module and rename it with your choosen name and setup the primary color and some other stuffs.  

After that , you applications loose the dependency with template and keep only with the theme (ideally).

So, if you change colors and css in your template, this will be valid only for the new applications you have created. To change for every applications, the changes should be made on theme. Because this is a hard dependency in fact.  


Best Regards

Fabio Fantato


Joseph Robinson wrote:

Thanks for the replies, guys. The problem I am/was having is that the template wasn't actually a dependency. The application/module was being created based off of the template, not being dependent of the template. Reading the doc guide more closely, there was a line that I apparently overlooked the first time through. It states:


"Once an application is created based on a template, further changes to the template will not impact this same application."


So that pretty much answers my question. I need to create the application/modules using the base/default template and then make my template a dependency instead of building the application/module based off of the template. That should then allow me to manage dependencies and grab updates on publish as you both have indicated.


Thanks!


Hi Joseph, you find the way by yourself while I were writing the answer. Nice. This is the idea. Try to keep theme and template in different modules :)


Regards

Fabio

lol

Yes, Fábio :)

I was understanding the "Template" as the "Application template", not as the "Module template".

Just a few observations.

The module template is used as the source for new "full responsive" modules.
When you create your first module, the system will create a clone of this module template.
That is the reason further changes will not affect the modules alread created. 

But if you don't have a "Home" module and creates a NEW responsive module after the changes in the template, the new module WILL have the changes in it.

Also, as usually the layouts and the themes are in the theme module of the template application, and as the template module references those elements, your module also references those as well. If you change things in the theme module, this will affect alread created modules. 

Cheers

Sorry to revisit this, but still trying to wrap my head around it as I learn and explore. What I am basically wanting to do is clone the Dublin template so that I can make some alterations and have it apply to my application modules to where if I go back and change someone on the template (i.e. change a color from blue to red) then the change will automatically (after publishing, of course) trickle to all of the modules in the application. 


I have successfully cloned the Dublin template. I have also successfully made my changes and published it. The new template now shows up when I create a new web application in the "Pick a template for your app" screen. As the content of this thread has shown, I am missing the step where I create a theme from the template and apply the theme to all of my modules (and I believe this is the missing key for the application/theme/template to behave the way I want). 


I just can't seem to get the theme part of it down. Is there a doc guide for turning a template into a theme, or can someone give me a high-level walkthrough on it? We're having a demo conf with outsystems tomorrow so I can ask then if I need to, but figured I would start at the community level.

Solution

Hi Joseph,

Not sure what you're asking.

Usually, a template (like Dublin) has two modules.
One, the template module, will be cloned when you creates a full responsive module in an app (based on the template app). 

The other is the Theme module. In there you put the theme, layouts, etc. Anything you want to be the same for all applications, but if you change, will be updated when you publish the apps.

Cheers.

Solution

Thanks Eduardo. You weren't sure what I was asking because my notion of the topics was wrong. I was thinking the template and theme were entirely independent of each other (i.e. 2 different applications). :) I think you explained it well enough, though. I will play around with adding a Theme_ module in the template application and see where I can get with it.


Thanks!

Joseph,

I think this course will help you to understand a bit better themes and templates.


Abílio Matos