Commit b220f8d9 authored by Liang Ding's avatar Liang Ding

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

parent d8c3c539
......@@ -126,7 +126,7 @@ public class UserTemplateProcessor {
final JSONObject preference = preferenceQueryService.getPreference();
filler.fillBlogHeader(request, response, dataModel, preference);
filler.fillUserTemplate(template, dataModel, preference);
filler.fillUserTemplate(request, template, dataModel, preference);
filler.fillBlogFooter(request, dataModel, preference);
Skins.fillLangs(preference.optString(Preference.LOCALE_STRING), (String) request.getAttribute(Keys.TEMAPLTE_DIR_NAME), dataModel);
} catch (final Exception e) {
......
......@@ -736,13 +736,14 @@ public class Filler {
/**
* Fills the specified template.
*
* @param request the specified HTTP servlet request
* @param template the specified template
* @param dataModel data model
* @param preference the specified preference
* @throws ServiceException service exception
*/
public void fillUserTemplate(final Template template, final Map<String, Object> dataModel, final JSONObject preference)
throws ServiceException {
public void fillUserTemplate(final HttpServletRequest request, final Template template,
final Map<String, Object> dataModel, final JSONObject preference) throws ServiceException {
Stopwatchs.start("Fill User Template[name=" + template.getName() + "]");
try {
LOGGER.log(Level.DEBUG, "Filling user template[name{0}]", template.getName());
......@@ -775,6 +776,10 @@ public class Filler {
fillArchiveDates(dataModel, preference);
}
if (Templates.hasExpression(template, "<#include \"side.ftl\"/>")) {
fillSide(request, dataModel, preference);
}
final String noticeBoard = preference.getString(Preference.NOTICE_BOARD);
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