Commit b220f8d9 authored by Liang Ding's avatar Liang Ding

某些皮肤标签墙使用了 side.ftl,模型填�

parent d8c3c539
...@@ -126,7 +126,7 @@ public class UserTemplateProcessor { ...@@ -126,7 +126,7 @@ public class UserTemplateProcessor {
final JSONObject preference = preferenceQueryService.getPreference(); final JSONObject preference = preferenceQueryService.getPreference();
filler.fillBlogHeader(request, response, dataModel, preference); filler.fillBlogHeader(request, response, dataModel, preference);
filler.fillUserTemplate(template, dataModel, preference); filler.fillUserTemplate(request, template, dataModel, preference);
filler.fillBlogFooter(request, dataModel, preference); filler.fillBlogFooter(request, dataModel, preference);
Skins.fillLangs(preference.optString(Preference.LOCALE_STRING), (String) request.getAttribute(Keys.TEMAPLTE_DIR_NAME), dataModel); Skins.fillLangs(preference.optString(Preference.LOCALE_STRING), (String) request.getAttribute(Keys.TEMAPLTE_DIR_NAME), dataModel);
} catch (final Exception e) { } catch (final Exception e) {
......
...@@ -736,13 +736,14 @@ public class Filler { ...@@ -736,13 +736,14 @@ public class Filler {
/** /**
* Fills the specified template. * Fills the specified template.
* *
* @param request the specified HTTP servlet request
* @param template the specified template * @param template the specified template
* @param dataModel data model * @param dataModel data model
* @param preference the specified preference * @param preference the specified preference
* @throws ServiceException service exception * @throws ServiceException service exception
*/ */
public void fillUserTemplate(final Template template, final Map<String, Object> dataModel, final JSONObject preference) public void fillUserTemplate(final HttpServletRequest request, final Template template,
throws ServiceException { final Map<String, Object> dataModel, final JSONObject preference) throws ServiceException {
Stopwatchs.start("Fill User Template[name=" + template.getName() + "]"); Stopwatchs.start("Fill User Template[name=" + template.getName() + "]");
try { try {
LOGGER.log(Level.DEBUG, "Filling user template[name{0}]", template.getName()); LOGGER.log(Level.DEBUG, "Filling user template[name{0}]", template.getName());
...@@ -775,6 +776,10 @@ public class Filler { ...@@ -775,6 +776,10 @@ public class Filler {
fillArchiveDates(dataModel, preference); fillArchiveDates(dataModel, preference);
} }
if (Templates.hasExpression(template, "<#include \"side.ftl\"/>")) {
fillSide(request, dataModel, preference);
}
final String noticeBoard = preference.getString(Preference.NOTICE_BOARD); final String noticeBoard = preference.getString(Preference.NOTICE_BOARD);
dataModel.put(Preference.NOTICE_BOARD, noticeBoard); dataModel.put(Preference.NOTICE_BOARD, noticeBoard);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment