Skip to content

Instantly share code, notes, and snippets.

View justsayantan's full-sized avatar
💭
I may be slow to respond.

justsayantan

💭
I may be slow to respond.
View GitHub Profile
@justsayantan
justsayantan / RemoveItemFromBundle.cs
Last active June 22, 2018 06:37
Remove Item From Bundle
public static void RemoveItemFromBundle(string bundleId, string itemId)
{
CoreServiceClient _CoreServiceClient = Utility.GetCoreServiceSettings();
ReadOptions _readOption = new ReadOptions();
//string bundleId = "tcm:5-1076-8192";
VirtualFolderData bundle = (VirtualFolderData)_CoreServiceClient.Read(bundleId, _readOption);
XmlDocument bundleConfiguration = new XmlDocument();
bundleConfiguration.LoadXml(bundle.Configuration);
XmlNameTable nameTable = new NameTable();
//=======================================//
// ------- Author : Sayantan Basu -------
// ------- Date   : 24-03-2015   -------
//=======================================//
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
@justsayantan
justsayantan / GetCompinentId.cs
Last active August 15, 2019 14:58
Retrieve Component By Title
public string getcomponentid()
        {
            var client = Utility.GetCoreServiceSettings();
            string result = "Item not found";
            string TargetFolderTcmId = @"tcm:5-1945-2"; // Put your folder tcm id here
            string title = @"Component Title";// Put your component title here
           
            var productsXML =
              client.GetListXml(TargetFolderTcmId,
              new OrganizationalItemItemsFilterData
public string getcomponentid()
{
var client = Utility.GetCoreServiceSettings();
string result = "Item not found";
string TargetFolderTcmId = @"/webdav/200%20Master%20Content%20(ENG)/Building%20Blocks/Content/"; // Put your folder's webdav url or tcm uri here
string title = @"Component Title";// Put your component title here
var productsXML =
client.GetListXml(TargetFolderTcmId,
new OrganizationalItemItemsFilterData