Plugin to use with WayFinder to link menu items with first page that has content, making all menus clickable, even if they are just containers. The script starts with the resource WayFinder would normally link to, and if it is a container only (no content) it will look down the page tree to find the first page with content and link to that page.
The property value "checkContainers" determines whether the script will require that a resource is set as a container, as well as having empty content, to skip over it in the page tree. Setting checkContainers to "yes" is useful if you want to leave some pages intentionally blank during development, knowing that you are going to fill them in later. The default is "no", meaning a resource only needs a blank content field to trigger the search down the page tree for a page with content.
The script returns the URL of the page.
This plugin was developed in Revolution 2.2.2, but should work well in older versions. Let me know if it is incompatible with the version you are using.
New in firstPageLink 1.0.4
- make database query more universal (don't search for modResource class key only)
- tested for compatibility with Revolution 2.3
- changed how weblinks are handled to allow for external link opening in new window
- add check for deleted resource
- fixed home page reference for root-relative environments
- fixed instance where link to home page could look like this: http:///