I have a long explanation related with my questions. You can skip them and jump to the generalized questions.
I am creating a web page with a purpose different than blogging. It is like a technical terms dictionary in Japanese. An entry under a category corresponds to a technical term.
The page has a 3 columns layout (beta-alpha-gamma). Gamma includes the list of categories. Beta includes the list of entries of a category whose entry is displayed.
If I click to a category in the gamma column, only its first entry is to be displayed. Also, if I click to an entry in the beta column, only that entry is to be displayed.
When the start page is loaded, alphabetically first entry of a preset category (like "
At first, I created a template module, "sidebars", listing the categories and related entries in the columns and called it from the "footer" module. I defined a variable, "disp_cat", to hold the value of displayed category in main index, some other templates and header module.
Start page is loaded very well. When I click to any link (category, entry, title of the entry, link to other entries in the displayed entry), the page loaded shows the first entry, but gamma and beta columns don't list the correct titles and a group of entries (pelase see below for a piece of related code) are not displayed. Unless I access to the start page, the problem remains same in any page loaded. It seemed to me that the module "sidebars" in a strange way when I access to archive pages.
<mt:Entries id="2648">
<a href="<$mtEntryPermalink$>"><$mtEntryTitle$></a>
</mt:Entries>
I couldn't solve it. I created index templates (sidebarx1, etc) for each bunch of code in the "sidebars" module, and I called them through "include" tag. The loaded page doesn't have similar problems described above, but the code for the beta column doesn't filter entries to create a list for the clicked category name. It seems "disp_cat" variable is not a variable for index templates. I couldn't pass it to the index templates (sidebarx1...). A piece of code in the index template(sidebarx1), given in question #3 below, shows the use of this variable. Its value is assigned in the template module (sidebars).
####
My questions are as follows:
1. What should I do to see the same special entry list in the sidebar of the start page, on an archive page when I clicked to a link taking me that page? Simply, how a can I keep the customized(?) contents of sidebars in any page?
2. Can I pass a variable, which is also used in other templates, to an index template? If I can, how?
3. What is the working mechanism of templates? I mean, why does an archive page treat a module (or a bunch of code in a sidebar, please see below for an example) different than the main page treats? This is very basic, but I cannot figure out the mapping mechanism behind MT. It appears me as a black box. I try to identify the things by trial and error. I highly appreciate if someone could show me any source or explain.
<div id="beta_bottom">
<MTEntries category="$disp_cat">
<br/><a href="<$MTEntryPermalink$>"><$MTEntryTitle$></a>
</MTEntries>
</div>
4. What is the best way to have a variable with a global scope? I want any change of its value to be up-to-date whenever the variable is called.
Reported on Movable Type 4.2
Installed MT. Blog available at http://domain.com/mt.
How to make a blog that was available at http://domain.com/?
And do not affect whether this change in the future if the need arises to create another blog in the subdomain?
Installed MT. Blog available at http://domain.com/mt.
How to make a blog that was available at http://domain.com/?
And do not affect whether this change in the future if the need arises to create another blog in the subdomain?
Hi.
You need to set the settings to the blog under Preferences. You do that for any new blog that you create, as long as the path and the url point to the place were you want you blog it will be as you want it to be. We have mt installed under a subfolder and have ceveral blogs in both subdomains, subfolder and even a different domain on the same server.