tag:help-archives.hannonhill.com,2010-02-09:/discussions/web-services/789-modifying-the-base-folder-of-a-siteCascade CMS: Discussion 2018-10-18T20:36:52Ztag:help-archives.hannonhill.com,2010-02-09:Comment/272692222013-06-12T13:28:50Z2013-06-12T13:28:50ZModifying the Base Folder of a site<div><p>Hi Justin,</p>
<p>Base Folder seems to be a little strange, you would think not
specifying either <code>parentFolderId</code> and
<code>parentFolderPath</code> for the Base Folder would be allowed.
Let me check with the developers to see if there's a reason for
this.</p>
<p>That being said, I was able to get the edit operation to work by
setting <strong>parentFolderId</strong> to the string
<strong>NULL</strong> in the following way:</p>
<p><code>$asset->parentFolderId = "NULL";</code></p>
<p>It looks like your function is generic, so what you could do is
check the Folder's <strong>name</strong> or <strong>path</strong>
to see if it equals <code>/</code>, and if so, set the
<strong>parentFolderId</strong> to the string
<strong>NULL</strong>.</p>
<p>Note: simply using the <code>NULL</code> reserved word does not
seem to work, so make sure you are using a string.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/272692222013-06-12T13:43:09Z2013-06-12T13:43:09ZModifying the Base Folder of a site<div><p>I had actually just added an if statement for the root folder to
store the folder ID for an index block I'm building in the same set
of code, so I added the line you mentioned above and its working
great!</p>
<p>This was the last piece to wrap up automating our site creation
steps. Thanks for your help!<br>
We now have a web form my team can fill out, that kicks off the
script that creates a group, a site, sets site url's, publishing
and roles, sets permissions, enables asset factories to the newly
created group, configures destinations, adjusts some generic
workflows, modifies a few base assets, creates a home page, adds
the home page to a menu block, sets the department name for
breadcrumbs, adds the site to the sitemap, and publishes the site
and site map.</p>
<p>It was over 100 steps on paper, but with a couple days of work,
and a little over 750 lines of code, it is down to fill out a web
form and click submit. I wish we had time to tackle web services
back when we first got started with Cascade.</p></div>Justin "JET" Turner