Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
component in template update not behaving as desired
Adam Stoller
Environment
[indent]TS/LS 7.2.1 P1 on Linux[/indent]
Scenario
[indent]Multiple existing Page files created from a Template which uses a given Component.
Find more posts tagged with
Comments
Bowker
This is totally not supported. It worked for us - it may or may not work for you.
The .page file is just an XML file.
I had a similar issue where I wanted the default value to be different or add a new value to a dropdown (I don't remember exactly what I needed to update, but it required an "Overwrite" and as you pointed out, that's pretty inconvenient.)
I wrote a short Perl script that went through all the .page files in the site, looked for the component, updated the .XML and wrote it back out.
Took about 30 minutes to write the script, 30 minutes to test it, 30 minutes to drink heavily before running it (I'm kidding) and about 30 seconds to run.
I suggest you make sure everything is submitted before starting the run so if something goes really bad you can get it all back.
In my case it worked really well, saved our content managers untold number of hours/days if they needed to do an overwrite.
Lesson learned - I put as little as I can in the component customization and put as much as I can into DCRs.
Adam Stoller
Hmm - okay - I would have thought that the datasource that gets called to generate the drop-down list would get called when you did an Edit Component within the context of an Edit Page - but apparently it only gets called the first time and then uses whatever data is already stored (as XML) in the Page file - yes?
Apparently it doesn't make a difference if we Update or Overwrite the Component on the Template - if we just Update the template on the Page the old XML (that contains the complete list of options) is still there.
If we create a new page - the only option that shows up in the Page output is the selected one - so the script should be fairly simple - thanks - I'll give that a try and test it out - chances are it will work (as you indicated)