Пример #1
0
 private void searcherConfig() {
   if (!Jpress.isInstalled()) {
     return;
   }
   String searcher = PropKit.get("jpress_searcher");
   if (StringUtils.isNotBlank(searcher)) {
     SearcherFactory.use(searcher);
   }
 }
Пример #2
0
 @Override
 public void index() {
   super.index();
   setAttr("module", Jpress.currentTemplate().getModuleByName(getContentModule()));
   setAttr(
       "delete_count", mDao.findCountByModuleAndStatus(getContentModule(), Comment.STATUS_DELETE));
   setAttr(
       "draft_count", mDao.findCountByModuleAndStatus(getContentModule(), Comment.STATUS_DRAFT));
   setAttr(
       "normal_count", mDao.findCountByModuleAndStatus(getContentModule(), Comment.STATUS_NORMAL));
   setAttr("count", mDao.findCountInNormalByModule(getContentModule()));
 }
Пример #3
0
  @Override
  public void onJfinalStartAfter() {

    Jpress.addTag("jp_contents", new ContentsTag());
    Jpress.addTag("jp_modules", new ModulesTag());
    Jpress.addTag("jp_tags", new TagsTag());
    Jpress.addTag("jp_taxonomys", new TaxonomysTag());
    Jpress.addTag("jp_archives", new ArchivesTag());

    Jpress.addFunction("taxonomyBox", new TaxonomyBox());
    Jpress.addFunction("option", new OptionValue());
    Jpress.addFunction("checked", new OptionChecked());

    searcherConfig();
  }
Пример #4
0
 private void renderTemplate(String name) {
   super.render(Jpress.currentTemplate().getPath() + "/" + name);
 }