1.
Make your Mapmaker container
The Mapmaker container will contain the notes that will become the “buttons” of your Imagemap. This container does not need to export, but the originals of the notes that it contains do. BoxPress Imagemaps always take you to the clicked note’s original (not to the ones inside the container). The Mapmaker container only provides the image you will copy to Preview and the positional information for the HTML <map> tag.
Method 1: Make a container to fill manually
Option A: Make a fresh container
If you are making your container from scratch, you get to enjoy a timesaving trick. After you create and name your fresh container note, before you do anything else set its prototype to mapmaker_note. When you change the prototype of a fresh (empty) note to mapmaker_note, the crucial origin_adorn adornment will be automatically created for you. (If you add anything to your Mapmaker container before changing prototype, the ready-made adornment will not appear.)
Option B: Using an already-existing container
If you want to use an already-existing map, you will need to make the origin_adorn adornment manually. Just make an adornment and set its name to origin_adorn. Then either hide this name by setting its $DisplayExpression
to ""
or " "
(a mere space won’t work), or give it an actual title.
To hide the name automatically, change the adornment’s prototype to mapmaker_adorn or outmaker_adorn. Doing this will also apply site-consistent styling. Also, giving all your HTML imagemap adornments the same prototypes will give your website some uniformity, let you change their styles instantly, and serve as a mnemonic for the user.
Assigning the mapmaker_note prototype will also lighten the container’s $MapBackgroundColor
. This is to help you adjust colors in case you have any link-lines or transparencies, for Tinderbox will change the background to white when you Copy View As Image.
Method 2: Make an autofilling agent
You can make a container that will automatically fill itself with aliases of the descendants of a container note whose contents you want to arrange into an HTML Imagemap.
Just make an agent, click on the current tab to remove the pop-over, and immediately set its prototype to outmaker_note. Then name it. I have named mine OutAgent: Demo. This will create the origin_adorn, set the agent information, and also bring up a special set of key attributes. Here’s the automatically generated agent info in case you’re interested:
The $AgentQuery
is this:
It says: “I will created aliases of every descendant in $outSource
as long as its outline depth is ≤ the depth you specified.”
descendedFrom($outSource(agent)) & $OutlineDepth(original)<=($OutlineDepth($outSource(agent))+$outDepth(agent))
Now set $outSource
to the name of the Source Container, and set $outDepth
to the outline depth to which you will extract:
I have chosen to make an OutMap for the PAGE Sampler: Default export container, whose contents are shown here:
The depth is relative to the source note, so an $outDepth
of 1 will only include the source note’s children—and the resulting outline will only have top-level headings. I have set $outDepth
to 6. Since the mapped container only goes to depth 5, all 15 notes are collected. They are automatically sorted by outline order:
About the name “origin_adorn”
Leave it nameless if you like, or use the Inspector > Text Inspector > Title to set its Display Expression to something else. Do not change its actual $Name
.