SiteSubsection
Enables the URL to do navigatey things.
What it does
SiteSubsection uses URL-path information in HttpInteraction to pick a branch.
It assigns the next breadcrumb in the URL to branchname
in the outgoing interaction, and chops that breadcrumb off of the URL. If this instance has a branch which has a name that matches with branchname
, control will flow into that branch.
How it works
{
instances = {
afdeling = SiteSubsection() {
// http://foo.bar/bekijk
bekijk->Module(f"bekijk.conf@byurl");
// http://foo.bar/bewerk
bewerk->Module(f"bewerk.conf@byurl");
// http://foo.bar/voegtoe
voegtoe->Module(f"voegtoe.conf@byurl");
// http://foo.bar/zoeken
zoeken->Module(f"zoeken.conf@byurl");
// http://foo.bar/
main->Module(f"main.conf@byurl");
// http://foo.bar/unforseen_consequences
default->Module(f"messages.conf@notfound");
};
};
}
Settings
None whatsoever. Maybe SiteSubsection is ignorant, or maybe it's just tired of the world telling it what to do. We will never know.
Branches
branch-name | trigger | interaction |
main | when there are no more URL breadcrumbs left to read. default_branch will be invoked if this is left unattached | SubsectionInteraction |
default | when no appropriate branch is available for invocation, this one will be invoked instead. | SubsectionInteraction |
[breadcrumb] | this branch will be invoked when its name matches the current URL breadcrumb | SubsectionInteraction |