Dynamically creating folders and pages from the data store in Kentico CMS

This article explains how to create folder structure and pages in Kentico content tree using code. These kinds of situations are very common when we want to move an existing site to Kentico CMS. Recently, we came across such a situation where we have to move the existing ASP site into Kentico CMS. The client is very particular about the same Folder and file structure because of the SEO (Search Engine Optimization). The other issue is moving of the content from the data store to the -Editable Text’ web part of the pages, which are large in number have to be created dynamically. 1.Creating folder structure from existing site. //Getting folder Structure from Existing site DirectoryInfo parentInfo = new DirectoryInfo(@”Existing site local copy path”); DirectoryInfo[] childInfo = parentInfo.GetDirectories (); if (childInfo.Length > 0) { for (int i = 0; i

// Create new instance of the Tree provider TreeProvider tree = new TreeProvider(CMSContext.CurrentUser); // Get parent node TreeNode parentNode = tree.SelectSingleNode(CMSContext.CurrentSiteName, “/”, “en-us”);

if (parentNode != null) { // Creating the folder TreeNode newNode = TreeNode.New(“CMS.Folder”, tree); newNode.DocumentName = childInfo[i].ToString(); newNode.DocumentCulture = “en-us”; newNode.Insert(parentNode); } } }

2.After creating the folder I want create the pages. Since all the pages in the site are similar in look and feel, I created a Page Template, and I created the pages using the below code. (You need to capture the template id to create pages dynamically).

// Create new instance of the Tree provider TreeProvider tree = new TreeProvider(CMSContext.CurrentUser); // Get parent node TreeNode parentNode = tree.SelectSingleNode(CMSContext.CurrentSiteName,”/”, “en-us”); string[] parfiles = Directory.GetFiles(@”Existing site local copy path”);

if (parfiles.Length > 0) { for (int f = 0; f

//Create instance for the new template PageTemplateInfo templateInfo = null; templateInfo = new PageTemplateInfo(true); // Create TestPage under parent folder TreeNode newNode = TreeNode.New(“CMS.MenuItem”, tree); newNode.DocumentName = parfiles[f].ToString(); newNode.SetDefaultPageTemplateID(templateInfo.PageTemplateId);

//The page will displayed on site map newNode.SetValue(“DocumentShowInSiteMap”, true);

//The page will not displayed on Navigation newNode.SetValue(“DocumentMenuItemHideInNavigation”, true); newNode.DocumentCulture = “en-us”; newNode.Insert(parentNode);

3.Finally, Moving the content from the data store to the editbale webpart in the pages

//Start accessing web part and adding content PageInfo parentpi = PageInfoProvider.GetPageInfo(CMS.CMSHelper.CMSContext.CurrentSiteName, “”, CMS.CMSHelper.CMSContext.CurrentDocumentCulture.CultureCode, “”, newNode.NodeID, false); if (dtcontent.Rows.Count > 0) { parentpi.EditableWebParts[“editabletext”] = (dtcontent.Rows[0][“Content”].ToString() != “”) ? dtcontent.Rows[0][“Content”].ToString() : “”; } Else { parentpi.EditableWebParts[“editabletext”] = “”; } // Set DocumentContent value newNode.SetValue(“DocumentContent”, parentpi.DocumentContent);

// Update node newNode.Update();

Ray Business Technologies is the pioneer in providing innovative IT Solutions in the areas of Social Media, Enterprise Portals, Magento eCommerce , Joomla cms, kentico cms,eEnterprise Resource Planning, Embedded Systems, Enterprise Portals and Content Management, CRM, and Enterprise Mobility Solutions.

Great Zen Cart Addons With Store Manager For Zen Cart Software

Zen Cart Addons are the most useful applications for online shop management. This article will explain to you that these Store Manager for Zen Cart extensions boost the work of store owners and also managers and open your store for the whole world.

ZenCart shopping cart is an excellent selection for your online store management. Store Manager for ZenCart is one of the most reliable tools and helps you to save your time and money. It comes with new great features, automates regular tasks and makes easier usual daily operations. You are going to be sure that your online store is in good hands.

ZenCart addons help to make store friendlier to business owners as well as consumers. They are Store Manager for ZenCart extensions, so this particular software must be installed. Zen Cart Addons help you globalize all of your store business. It automate and greatly improve regular tasks and operations giving you clear and stress-free management.

ZenCart Addons will let you make what you offer widespread and well-known across the world. As an example, eBay export gives you the opportunity to export products, their descriptions and auction configuration settings from your own store to eBay. The last one is an internet auction website where you are able to buy and sell an over-all kind of product or service throughout the world.

Another ZenCart addon – IceCat Product Catalogue Integration enables not to waste time thinking over a good detailed description of the product. You simply need to download product information and images right from IceCat Catalogue. The easily understood descriptions make your products easy-to-find on the internet.

Popular store with high sales invites plenty of new clients. Mass Product Changer addon can easily increase sales. It enables you to make product pricing fantastic in few clicks. Clever marketing price tag like $9.99 as a substitute of $10.00 can supply you with plenty of new consumers.

ZenCart Addons also give the opportunity to export all of your products, customers data and orders right from your store to QuickBooks (great accounting software) and also orders from ZenCart to Mail Order Manager Software. They enable printing postal shipping labeling right from your store manager and even automating product import from secondary sources into your store. You can easily create separate ads in Google AdWords for each and every product in your store. These particular tools also help to import/export product and customer information between the store with your accounting package, etc.

To summarise, these addons make store management a lot easier, faster and more convenient, provide you with the possibility to promote your products on the web thus increasing the number of your customers. Do not waste time. Invest in your upcoming future. Try ZenCart Addons immediately!

Indian Handbag Wholesale Shopping

Our stunning range of wholesale designer handbags will suit the most discerning of tastes. No matter whom you are, or what you are looking for, Shop for Bags.com has a handbag that not only suits your distinct individuality but also your pocket. Don?t allow the cost of your much desired designer handbag to diminish your need to own an attractive and stylish designer handbag. At Shop for Bags.com we will allow you to own the designer handbag that you have always desired.

Or the hot pink logo print designer handbags, at the wholesale cost of $18.50. We are sure you will fall in love with our range of designer inspired handbags, and at these low, low prices you don?t have to limit yourself to one ? you can buy one in every color and color co-ordinate your wardrobe. Perhaps the silver and gold designer inspired wholesale leaf handbag will offer more of an appeal to your designer tastes, available at a mere $14.95 – $15.50, a give way price for this elegant and stylish designer inspired handbag. Dare to impress your friends and your colleagues and be the talk of the fashion world, by dazzling them with your incredible sense of class. With our wide range of wholesale designer inspired handbags, we at Shop for Bags.com are certain that you will find a handbag to match each and every outfit in your wardrobe. Be dazzled by our stunning range of designer handbags.

Our designer inspired handbags are available in a range of colors and because they are designer handbags, they are unique and one of a kind. If you are looking for an attractive designer inspired handbag to go with that stunning black number, we guarantee that finding a handbag to match will be simplistic. At Shop for bags we want to find the right bag for you and our designer inspired leather handbags make our task simple.

Perhaps you are strong-minded career lady and want to dress for success; our designer inspired handbags were designed with your in mind. We feel that work should no longer be mundane and boring and you can dress up and with a designer inspired beaded handbag to match. You are now able to set your own rules for success and climb the corporate ladder in class and make a fashion statement while you doing. Be the talk of the corporate world and allow our assortment of designer handbags do it for you.

Maybe you are playful and young at heart and you want to set the party scene alight. Shop for Bags.com has a designer inspired handbag with your name on it. Our designer inspired handbags are available in fun and funky designs, allowing you to match your handbag with your mood. Turn your friends green with envy, by having a handbag to match every pair of shoes in your wardrobe. Explode onto the party scene with one of our funky and fresh wholesale designer inspired handbags.

Western Home Decor is in Store

Got a hankering for fixin’ up the home front? There’s no need to be a fussin’ over the stores in your town when you can have new stuff for the homestead at the click of the mouse. Kick off your boots and load up on some of these western home decor suggestions.

Get ready for western style living by first choosing a particular western theme that is to your liking. Consider a cowboy theme complete with a cowboy hat switch plate, a western antler rope basket, a southwest clock (instead of using the sun and moon), and a figurine of a hard working western hero. Of course, you can add a couple of spur bookends over the fireplace and some cowboy storybooks to play up the theme.

With a horseshoe theme you could go with just a few simple additions such as trivets, coat hooks, a napkin holder and even a welcome sign with the family name. You could also center your theme on bandanas, boots, horses, the Wild West, or just rich leather accents.

Discover unique western interior design ideas and create the western home decor or log cabin decor plan of your dreams by choosing to mix a variety of items like covered wagon replicas, old barn paintings, western rugs, a Native American chandelier, or even a lodge wall light.

You can even find toilet seats that are engraved with western characters or wildlife on stained and lacquered wood. They can even be engraved with messages on the inside and brass hinges to add to the western design.

Shop for western bedding by choosing a southwestern sunset bedding set. Some have genuine leather trim, silver conchos and various desert colors. The desert colors give bedding sets a luxury feel you can only dream of. Many queen sets include duvet covers, bed skirts, two pillow shams, a toss pillow and some even have a bolster pillow. The king sets usually add an extra European pillow because of size.

Get a ranch home feel by adding a different array of tables to your living room mix. A teak side table made of reclaimed teak timbers from aged farm homes, abandoned ox carts, and other weathered farm implements would be practical choices. You could play cards in style with a fancy poker table and chairs made out of European beech wood. Or wait out a game of pool in the comfort of a classic billiards chair. Get one with a carved hardwood frame and leather upholstery. Don’t forget a foot rest with nail-head trim to match.

You are sure to brighten up any bare or uninspired space with any of these rustic choices. So what are you waiting for? Get saddled and giddy up for your new western look!