code: @Override
  	public int compareTo(ElementRef o) {
  		int diff = pageRef.compareTo(o.pageRef);
  		if(diff != 0) return diff;
  		return id.compareTo(o.id);
  	}
docs: Orders by page then id.
  
  @see  PageRef#compareTo(com.semanticcms.core.model.PageRef)