initial templates support
added default sorting template
method is not not changed if staying within the same scheme
added support for cross endpoint scope linking and used in in template