Bruceee's Sandpit
Web Design with SiteSpinner
The previous page discussed ways of making bookmarks based on text objects.. On this page are additional ways of using anchors, based on geometry and object names, and some tests of each anchor type. Also, my current thoughts on the merits of the various types of anchors.
The tests
The tests cover links to the types of anchors in the main bookmarks page plus the new ones covered above. Here is the kind of link represented by each abbreviation in the test area links:
- TextIndepend -- small independent text object with an embedded anchor
- TextEmbed -- embedded anchor placed at the start of a regular text object
- TextGeo -- geometry name of a text object
- TextObj -- object name of a text object
- ImageGeo -- geometry name of an image
- ImageObj -- object name of an image
The tests are based on two areas, one nearer the top of the page and one nearer the bottom. You should be able to flick quickly between the two areas by clicking on the links in each area.
Using objects as anchors
All objects that aren't includes have unique names. The default is a name like 'obj408' -- you will see this when you select the object. When the page is published, this object is identified in the published code as 'Oobj408' -- always identical to the object name, but with the addition of an upper case letter 'O' prefix. These identifiers are the anchor names.
Click on the object you want to use as the anchor. The drop-down object list at the top of the workpage tells you the object name. You can also find the name by looking in the Quick Editor or the Object Editor. Your object will have a name like 'obj408'. The corresponding name for the anchor will be 'Oobj408'. You may wish to identify objects used as anchors by giving them a special name. e.g. 'anchor1'. In this case the anchor name will be 'Oanchor1' -- add the upper case letter 'O' prefix.
Remember this anchor name with the 'O' prefix -- you will use this when you make the link.
Caution -- might be unreliable
Links to objects and geometries under some conditions may be unreliable. I started the Z-Order page using objects as anchors, and the links worked with IE6. However, by the time I finished the page, they no longer worked in IE6 -- well one continued to work, the others did not. I modified the page some more -- then none of them worked in IE6! But they all worked and continued to work in Netscape, FireFox and Opera.
This Virtual Mechanics forum FAQ gave me the idea to use the geometry name instead of the object name. It makes the point that the geometry method is not reliable in some other browsers, and I can confirm that.
In the Z-Order page where the object anchor did not work for IE6, I changed to the geometry anchor and everything worked fine on all four browsers. So the Z-Order page now uses only geometry anchors -- including the 'top of page' anchor.
When I built the test areas on this page, I found that although an image geometry anchor worked under IE6, it would not work with the other browsers. This still fails for me in the test areas.
Based on this limited testing, I would not use the geometry anchor to link to an image. I would also be cautious about linking to other geometries that are not text objects. Such links may not work in Netscape, FireFox or Opera. Instead, I would link to the the object.
Disadvantages of geometries/objects
These are disadvantages of geometry and object anchors when compared to embedded text anchors:
- If you give objects and geometries meaningful names, SiteSpinner insists they be different for copies. If you have an object called "objTop" on one page, SiteSpinner won't allow you to reuse that name for another object on a different page
- When you copy a page, copies of objects and geometries get new names. Sadly, the links to any geometry or object anchors are not updated in the copy -- you have to do it by hand
- Object names are unreliable in IE6 -- it seems to depend on the page construction
- Geometry names of images consistently don't work in FireFox, Netscape and Opera
So it's a matter of individual choice. Whichever method you use, test it with your actual pages on the most common browsers. After all this, my slight preference is to use the geometry method -- but I'll make sure to test the bookmarks.
Haaalp! -- my bookmark don't work
If your bookmarks don't work, check out this section of the main bookmarks page. Also check the following points.
- If you are using a geometry name as an anchor, include the upper case letter 'G' prefix in links. Your link name should be like #Gmyanchor
- If you are using an object name as an anchor, include the upper case letter 'O' prefix in links. Your link name should be like #Omyanchor
- Don't forget to test your bookmarks on several browsers. It is possible for a bookmark based on a geometry or object name to work in some browsers but not others.
Top Test Area
This area is bookmarked using several different methods. In turn, it is linked to a matching test area further down this page. The links here link to equivalent anchors in the bottom test area. For the meaning of each link abbreviation, see The tests. Try the tests with different browsers too -- you may find differences.
TextIndepend TextEmbed Text Geo Text Obj ImageGeo ImageObj
Bottom Test Area
This area is bookmarked using several different methods. In turn, it is linked to a matching test area further up this page. The links here link to equivalent anchors in the top test area. For the meaning of each link abbreviation, see The tests. Try the tests with different browsers too -- you may find differences.
TextIndepend TextEmbed Text Geo Text Obj ImageGeo ImageObj
Using geometries as anchors
Every object is based on a 'geometry' which specifies attributes like size, shape and color. The default is a name like 'geo408' -- you will see this in the Quick Editor. When the code is published, the object with this geometry is identified in the published code as 'Ggeo408' -- always identical to the geometry name, but with the addition of an upper case letter 'G' prefix. These identifiers are the anchor names.
Click on the object you want to use as the anchor and open the Quick Editor. The Outline tab tells you the geometry name. You can also find the name by looking in the Geometry Editor. Your geometry will have a name like 'geoj408' or 'rtf408'. The corresponding name for the anchor will be 'Geoj408' or 'Grtf408'. You may wish to identify objects used as anchors by giving them a special name. e.g. 'geoTop'. In this case the anchor name would be 'GgeoTop' -- add the upper case letter 'G' prefix.
Remember this anchor name with the 'G' prefix -- you will use this when you make the link.
Making the Links
The previous bookmark page covered the steps for making links to anchors based on text objects. Exactly the same procedures apply to making links to anchors based on geometry and object names.
If you are using a geometry as an anchor, include the upper case letter 'G' prefix. Your anchor name should be like Grtfmyanchor, GgeomyAnchor or GmyAnchor.
If you are using an object as an anchor, include the upper case letter 'O' prefix. Your anchor name should be like OobjAnchor or OAnchor
Advantages of geometry/object anchors
These are advantages of geometry and object anchors when compared to embedded text anchors:
- Using the geometry/object anchor avoids setting a specific anchor -- there is one already there. You save some work, and it generates slightly less code.
- With the geometry/object anchors, you can bookmark an existing SiteSpinner page without modifying the page -- many possible anchors already exist
Which method is best?
It's your choice. There are no clearcut advantages of one method over another. Nonetheless, there are some differences which may affect your choice:
Neutral points about geometries/objects
These are points which are neither advantages nor disadvantages when compared to embedded text anchors. Similar considerations apply to embedded text anchors too.
- If you have cloned or included objects on different pages, anchor names will be duplicated,. Clones/includes have the same geometry/object names, but because the page name is also included in the inter-page link, and that is unique, there is no ambiguity about which anchor a link points at.
- There must be only a single anchor of the given name on a page. Clones share the same geometry. If you are using a geometry as an anchor, a link may arrive at any of the clones on the page -- there are no guarantees, and each browser may be different. For this reason, if you have clones on a page, do not use the geometry name as the anchor.
Update on unreliability
A few months later...
After having tried the geometry/object method of bookmarking for a while, I have concluded that it is too unreliable for regular use. I have a page (TextSpacing) where the bookmarks had been working fine. Some while later, I visited the page and found that the bookmarks no longer worked (IE6). I may have made some minor changes to the page, but even so, I don't expect unrelated changes to affect my bookmarks like this 
Coupled with the fact that they may work in one browser but not another, I will now use this form of bookmark only as a last resort.