}
// add the repositories to the context
Iterator repositories = siteContext.getRepositories().iterator();
while (repositories.hasNext()) {
Repository repository = (Repository) repositories.next();
context.put(repository.getName(), new RepositoryWrapper(repository, context));
// add the fs_repository also as the name 'pages' so we can use existing logic in pages
// note this is a hack and we should look at doing this a different way; but first need
// to investigate how to get content from different repositories
if (repository.getName().equals("fs_repository")) {
context.put("pages", new RepositoryWrapper(repository, context));
}
}
try {