tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/20453-create-templates-with-system-assetlocal-blocksCascade CMS: Discussion 2015-12-17T19:22:37Ztag:help-archives.hannonhill.com,2010-02-09:Comment/384604842015-11-13T22:39:17Z2015-11-13T22:39:19ZCreate templates with system-asset:local blocks<div><p>We have a central site that we use to store common templates.
When we create a new site we use the templates from the central
site. It works really nice to keep things organized when changing a
template.</p>
<p>The problem I have right now is that when I create a new site,
because of the way or navigation works, I have to create a folder
index block for the site itself. Then in the template for some of
the outputs I have to set the block to be the folder index block I
created for the new site. I'm wondering if there is a way for me to
either have a central folder index block that automatically adjust
for whatever the current site is, or if there is a way to set the
default outputs for the template to use the local folder index
block for the current site.</p>
<p>Thanks and hope I did a good job explaining this problem.</p></div>Johntag:help-archives.hannonhill.com,2010-02-09:Comment/384604842015-11-14T17:59:52Z2015-11-14T20:53:31ZCreate templates with system-asset:local blocks<div><p>Hi John,</p>
<p>I don't think that either of your options is possible. For
example, if you need a site map, you do need an anchored index
block for the site. Non-anchored index blocks can only start
indexing from the calling page.</p>
<p>At Upstate, I use the same approach: centralizing templates,
config sets and content types. I use web services to create new
sites. Therefore, the setup is automatic.</p>
<p>I never attach blocks/formats specific to sites (e.g., the index
blocks used to generate site maps, menu bars, etc.) to any regions
at any level. Instead, they are picked up by indexing, using a
global index block.</p>
<p>I talked about this approach in the presentations of <a href="http://www3.hannonhill.com/csuc13-video-block-choosers-configuration-blocks-metadata-sets-indexing-and-xslt-by-wing-ming-chan-hannon-hill-cascade-page">
2013</a> and <a href="https://hannonhill.wistia.com/medias/i8jk5qu9rj">2015</a>. I also
documented everything I have been doing in <a href="http://www.upstate.edu/cascade-admin/">my site</a>. Let me know if
you need more information.</p>
<p>Wing</p></div>Wing Ming Chantag:help-archives.hannonhill.com,2010-02-09:Comment/384604842015-11-16T15:29:39Z2015-11-16T15:29:39ZCreate templates with system-asset:local blocks<div><p>Hi Wing,</p>
<p>Thanks for the comment.</p>
<p>From my understanding, a global index block will only working if
it is indexing from the calling page. So to make an index block
that indexes from the base folder of a site it has to be attached
to the folder in the site.</p>
<p>Thanks</p></div>Johntag:help-archives.hannonhill.com,2010-02-09:Comment/384604842015-11-16T15:43:10Z2015-11-16T15:43:10ZCreate templates with system-asset:local blocks<div><p>Yes and no. You need an anchored index if you want to get
information of the entire site or the entire folder. You need a
non-anchored index block if you just need to look upward to use
ancestors and sideway to use siblings.</p>
<p>For site information like look-and-feel, general configurations,
and so on, I can use what I call configuration blocks to store the
information and use the global index block to pick them up. For
site map, site-specific menu bar and so on, they are anchored to
the site. But still, they are not attached to any region. That's
how I can use a single template, a single configuration set, and a
single content type to generate multiple sites.<br>
That is to say, the need for site-specific index blocks (anchored
index blocks) and the need to attach them to regions are two
different things. You can have the site-specific index blocks
without having to attach them anywhere. This is how you can free up
your templates and so on, without tying them to any site.</p>
<p>Wing</p></div>Wing Ming Chan