vasanth
I'm new here

HTML Channel Modification

Jump to solution

Hello,

Currently I am working in FS 5 migration Task and one of the task was to change the HTML channel of the template

FormatTemplate tmp = formatTempItr.next();

                for (TemplateSet templateSet : tmp.getProject().getTemplateSets())

                {

                    String source = ((ChannelSourceProvider) tmp).getChannelSource(templateSet);

                    source.replace ("some text","replacement text");

My doubts is how to save the changes back to the template ??

I have tried the below lines of code but it didn't work.

tmp.setChannelSource(templateSet, deprBuffer.toString());

Regards,

Vasandharaj M.

0 Kudos
1 Solution

Accepted Solutions
Peter_Jodeleit
Crownpeak employee

Your code should work. Do you have a "save" call after setting the changed channel source?

Peter

View solution in original post

0 Kudos
2 Replies
Peter_Jodeleit
Crownpeak employee

Your code should work. Do you have a "save" call after setting the changed channel source?

Peter
0 Kudos

Ah I forgot that. i will do that and let you know.

0 Kudos