next up previous contents
Next: return_page() Up: MIC Perl Programming/Markup Previous: Mounting Piles   Contents


Specifying Pages within the MIC-Site

There are many times within MIC-HTML when one needs to specify a page. Within a MIC tag, it is done in the following manner:

  1. list each sub-directory off the root of the site

  2. specify the page name (the .html, .mic, .HTML and .MIC are optional)

See the section about MICinclude for an example.

Note, however, that within the HTML tags, there is no change from the standard fashion. An <a href="...> tag stays the same and does not follow the above procedure. You specify the link relative to the page where the link is located on and it is allowable to have `..' in the path information.7.2

The reason for this is the way that MIC thinks about pages versus how the web server thinks about them. The web server is requesting these pages through the agency of the piledriver. Within MIC, however, pages are functions. MIC takes your page specification and converts it to a function call.

In fact, sometimes you want to be able to redirect control flow explicitly. An example of this has already been provided in the discussion of the setup routine in the control file. Rarely, but, at times, you will want to do this for a page as well. That is, you might have something like:

...
<MICPerl>
if ($customer-&gt;secure()) {
  return return_page('login/secure');
}
else { return return_page('login/insecure');
</MICPerl>
...

MIC 3.01 allows the return page to be in a directory other than the current directory. Users should note that this will only work as expected if the end-user's browsers support the location tag. Care should also be taken if one is using frames and the user programmer wishes different buttons to have differnt targets. For this to work as expected, it is still necessary for one to have multiple forms.



Subsections
next up previous contents
Next: return_page() Up: MIC Perl Programming/Markup Previous: Mounting Piles   Contents