How do I add the 7z extension and allow 7z files to import via browse repository |
First add the EDT7Z to the system. On LCA 2014 this is done using TridkXmlSetup (C:\InfoShare\App\Database\Common\DatabaseIndependent\Examples\CreateEDT) You can duplicate the RunSetup-CreateEDTZIP.bat and CreateEDTZIP.xml and change the reference to zip into 7z. Attached you can find CreateEDT7z.xml and RunSetup-CreateEDTZIP.bat as example. On Knowledge Center 2016 and Tridion Docs 13 and 14 the procedure is different, it uses powershell scripts to add EDTs. These are also located in C:\InfoShare\App\Database\Common\DatabaseIndependent\Examples\CreateEDT You can duplicate Create-EDTZIP.ps1 for example. Attached you can find Create-EDT7Z.ps1 as example. Now you have to create template objects in the Web UI. Login as administrator and navigate to Repository - System - Editor template Create a folder of type Other and call it Templates In this folder create a ISHEDITORTEMPLATEOTHER7Z , extension 7z and attach a small 7z file and release it. In Tridion Docs 14 this has to be done using PowerShell because you cannot set the ID anymore in the Web UI. You can use the following PowerShell piece with a working $ishsession variable. $templateTitle = "ISHEDITORTEMPLATEOTHER7Z" $templateDescription = "7 zip template file" $templateFile = "C:\Temp\some 7 zip.7z" $templateLogicalId = "ISHEDITORTEMPLATEOTHER7Z" $edt = "EDT7Z" $initialStatus = "VSTATUSDRAFT" $releaseStatus = "VSTATUSRELEASED" $othersTemplateFolder = Get-IshFolder -FolderPath "\System\Editor template\Others" $metadata = Set-IshMetadataField -IshSession $ishSession -Level Logical -Name FTITLE -Value $templateTitle | Set-IshMetadataField -IshSession $ishSession -Name "FISHEDITTMPLTDESCRIPTION" -Level Lng -ValueType "Value" -Value $templateDescription | Set-IshMetadataField -IshSession $ishSession -Name "FAUTHOR" -Level Lng -Value $ishsession.UserName | Set-IshMetadataField -IshSession $ishSession -Name "FSTATUS" -Level Lng -ValueType Element -Value $initialStatus $ishobject = Add-IshDocumentObj -IshSession $ishSession -IshFolder $othersTemplateFolder -IshType "ISHTemplate" -LogicalId $templateLogicalId -Metadata $metadata -Lng "en" -Edt $edt -FilePath $templateFile $ishMetadataFieldsReleased = Set-IshMetadataField -IshSession $ishSession -Name "FSTATUS" -Level "Lng" -ValueType "Element" -Value $releaseStatus $ishobject = $ishobject | Set-IshDocumentObj -IshSession $ishSession -Metadata $ishMetadataFieldsReleased Make a backup of C:\InfoShare\Web\Author\ASP\ClientConfig\MetadataConfig.xml. Open C:\InfoShare\Web\Author\ASP\ClientConfig\MetadataConfig.xml and locate the <ishfrm id="Importer.OpenFileDialog"> element Duplicate <typeoptions ishcondition="ISHType='ISHIllustration'"> and change it into: <typeoptions ishcondition="ISHType='ISHTemplate'"> <valuelist> <enumlist> <item> <value>*.7Z;</value> <label resourceref="Template.FileTypes.All.Label">Other files (*.7z)</label> </item> </enumlist> </valuelist> </typeoptions> On the bottom of C:\InfoShare\Web\Author\ASP\ClientConfig\MetadataConfig.xml locate <ishassociationdef> and add <ishfileextensionassociation name="7z" ishtemplate="ISHEDITORTEMPLATEOTHER7Z" /> Make a copy of C:\InfoShare\Web\Author\ASP\Resources\DialogStrings.xml Open C:\InfoShare\Web\Author\ASP\Resources\DialogStrings.xml and add <resource resourceid="Template.FileTypes.All.Label">Other Files (*.7z)</resource> next to <resource resourceid="Illustration.FileTypes.All.Label">Other Files (*.7z)</resource> After this you should be able to drag and drop 7z files into a folder of type Other (type ISHTemplate). Or use the import button on top of the folder content. |