Best practice for adding modules to a template .vte?
I have created a new module for the GHV 2.4.1. I can get it to work locally and on the server if I add my script file and update config files of an already deployed viewer.
I would like to roll my module into the template (.vte) so I don't have to manually add the module and settings to all new viewers. I am not clear exactly the right way to go about this.
If I copy the latest GHV 2.4.1 .vte from Latitude and then change the extension to .zip I can see the folder structure within the template. I am confused which config files should be updated, the ones in
Configuration\VirtualDirectory\Resources\Config\Default
or in the zipped
Export\Resources\Config\Default
And then where do I put my custom compiled Custom.js file? Seems like in the Export folder?
Regards,
--Marc
-
Marc,
There are basically 3 sections to a VTE file:
1) Configuration directory: contains copies of all the files that are copied into your new viewer's virtualdirectory folder (i.e. [sitename]\viewers\[viewername]\virtualdirectory )
2) The Export.zip file: contains copies of all the files that will go into the website's root directory (where you want to load the index.html file from)
3) ManagementPack.zip file: contains copies of all the files needed (as near as I've been able to determine) for the integration of the VTE into Essentials Manager.We have customized the VTE pretty extensively (multiple custom modules, new CSS, addtional language, etc.) and the approach I have taken is to take the VTE, unzip it, unzip the Export.zip and ManagementPack.zip (unzip them at the same directory level as the zip files - so you have an export.zip file and export directory). If your custom module will be shared (never customized for an individual site) you can add a new folder called 'Custom' under the Export\resources folder (it could go under export\compiled also, but we like to keep our custom code seperate from the default code). Inside the 'custom' folder, create another directory named after your custom module (eg. export\resources\custom\mymodule) and put your module code in there. If you need to be able to customize the module per viewer, follow the same steps above but put the files in the 'configuration' directory instead of 'export' (remember that the 'configuration' directory is copied for each new viewer you create). For maximum flexibility, we put our custom modules in both locations - we don't always know when I client will want to tweak the functionality of a module we thought we be generic.
Update the xxxx.json.js files in all 3 VTE locations (configuration, export and managementpack directories to include your custom module references (library and module sections), making sure you've updated the path to the compiled module correctly.
After that, we just zip up the contents of the export and managementpack directories again and replace the existing .zip files. We also update the template.xml with new TemplateID, DefaultVirtualDirectory, DisplayName and Description so that we can differentiate this VTE from the default one and manage versioning easier. Finally, zip up the entire VTE directory again, rename it back to xxxx.VTE and install it through Post Installation Manager.Hope this helps,
Peter.0 -
Thanks, Peter! That is very helpful.
Regards,
-Marc
0 -
HI Peter,
I have tried as you suggest. My viewer template is upgrading, but not my viewer configuration. I Have followed below steps to create custom .vte
Packaged a custom .vte with custom modules(Export), configuration in it and changed Template version and display name in Template.xml.
isntalled using post install. but New template has custom modules as has installed seccussfully but Essentials not will upgrading all my configured viewers. But they are skipped
/customer/servlet/servlet.FileDownload?file=00P6000000elzIzEAI
Thanks,
josna.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare