some codechanges to get pagelink plugin to work.