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)
Disable user selection for one Template
System
We are currently using two generic templates for publishing pages in TeamSite because unfortunately the styles in new template were not compatible with pages which were already generated using the old template. So we are in a process of converting all the pages to use our new template but meanwhile since we cannot delete the old template, it would really help if somehow we can disable selection of the old template so that we can enforce our users to use the new template (tsnew.tpl) instead of the old one (tsold.tpl). Is there any way to do that? Please let me know. Attached is the code I am trying to modify from tempating.cfg file.
Thanks
Find more posts tagged with
Comments
Migrateduser
You can restrict access to templates with the <cred> tag, by either specific user (pain in the rump to maintain) or role (probably not flexible enough for what you need pre-6.7). In any case, it sounds like you can't really restrict them from using the old templates until the old pages are converted (after all, they might need to edit one), so you're in a bit of a pickle.
What is the nature of the changes from one template to the other? It might be fairly simple to script updating the DCRs to the new template and regenerating all the pages that used that template.
Migrateduser
Actually, both the templates are using the same datacapture file and as you can see in the attached templates, the major difference between the two is in the styles and layout. The new template is using only the div tags and using cascading stylesheet to render page content. On the other hand the old template is using Table layout and a different stylesheet. So when I regenerate any old page which has tables all the styles are messed up. And not only that it’s also adding some funky characters like for example “” with the regenerate. That's why we thought of keeping both the templates for now so that the old pages doesn't get affected with this change.
Migrateduser
Gotcha - I wasn't reading closely enough to see that you only meant a new PT rather than a new DCT.
The A with a carat is most likely a charset issue. Make sure you are consistently using the same charset all the way through (including the charset defined in your VFE configs, if applicable, and in the meta tags of the generated HTML), and that should go away.
Unfortunately, the same issues of selectively enabling/disabling PTs in templating.cfg are applicable. However, you might use some FormAPI to pre-select the PT and prevent users from changing it. So for files generated from the old PT, you could lock that down and any new files would use the new PT.
When you say that tables get messed up when rendering with the new template, do you mean tables pasted in via a VFE? If it's just a matter of having changed from table layout to CSS layout, it's not clear to me why it should matter if your CSS is set up correctly.
Migrateduser
Don't know how to do this (I mean locking the pt). Is there any documentation you would like to suggest? Won't it work by modifying the templating.cfg? What are the issues of selectively enabling/disabling PTs in templating.cfg? Can you please tell me how can I do it.
Migrateduser
You'll find the information regarding adjusting which presentation template is used on pages 65-66 of the 6.5 FormAPI manual.
The reason I counsel you against disabling the PT entirely is that the pages generated by it may presumably need to be edited and regenerated in the future. If for some reason, your new presentation template cannot handle generating them and you force your user to use it, you'll be trapping them into creating bad pages.
Ideally, you want to figure out what's wrong the new PT and correct the problem so that it will regenerate those pages. Then you could write a script to go through, change the TeamSite/Templating/PrimaryPT EA on those, regen the files, verify them, and submit the changes.