Configure the News Detail Page

Previous Step

Configure the News Overview Page

After applying the HTML from the web design to the out-of-the-box News Overview, you are going to do the same to the News Detail page.

Take a Look at the Web Design

Load the web site in your browser:  http://localhost:8080/site/.

Browse to a news overview page and click on the first news article. Like the news overview before you applied the design, it doesn't look very good yet.

Now load the web design in your browser and browse to the news overview and click on the first news article. This is what the news detail page in your site should look like.

Apply the Web Design to the News Detail Template

Open the file news-detail.html found in the web design. Here you'll find the HTML markup for news articles.

Locate the element   <div class="body-wrapper"> in  news-detail.html. This element contains the news article.

Open the file repository-data/webfiles/src/main/resoucrs/site/freemarker/hstdefault/newspage-main.ftl found in your project. This is the template that renders the news article.

Apply the HTML markup for the News article found in news-detail.html to the Freemarker code in newspage-main.ftl. For now ignore any markup for the related news links, you will get to that later in this sprint. The 'large' image variant is available through an image's large property, i.e.  document.image.large.

Make sure the keep the <@hst.manageContent> tag which renders an edit button in the channel preview.

You will end up with something similar to the following:

<#include "../include/imports.ftl">
<div class="body-wrapper">
  <div class="container">
    <div class="row">
      <#if document??>
        <@hst.link var="link" hippobean=document/>
        <div class="col-md-9 col-sm-9">
          <div class="blog-post has-edit-button">
            <@hst.manageContent hippobean=document/>
            <div class="blog-post-type">
              <i class="icon-news"> </i>
            </div>
            <div class="blog-span">
              <#if document.image?? && document.image.large??>
                <@hst.link var="img" hippobean=document.image.large/>
                <div class="blog-post-featured-img">
                  <img src="${img}" alt="${document.title?html}" />
                </div>
              </#if>
              <h2>${document.title?html}</h2>
              <div class="blog-post-body">
                <p>${document.introduction?html}</p>
                <@hst.html hippohtml=document.content/>
              </div>
              <div class="blog-post-details">
                <div class="blog-post-details-item blog-post-details-item-left icon-calendar">
                  <#if document.date??>
                    <span class="date">
                      <@fmt.formatDate value=document.date.time type="both" dateStyle="medium" timeStyle="short"/>
                    </span>
                  </#if>
                </div>
              </div>
            </div>
          </div>
        </div>
      </#if>
    </div>
  </div>
</div>

Browse to the news overview in the web site again and click on the first news article. It should now conform to the web design.

Next Step

Configure the About Page

Full Source Code

newspage-main.ftl

<#include "../include/imports.ftl">
<div class="body-wrapper">
  <div class="container">
    <div class="row">
      <#if document??>
        <@hst.link var="link" hippobean=document/>
        <div class="col-md-9 col-sm-9">
          <div class="blog-post has-edit-button">
            <@hst.manageContent hippobean=document/>
            <div class="blog-post-type">
              <i class="icon-news"> </i>
            </div>
            <div class="blog-span">
              <#if document.image?? && document.image.large??>
                <@hst.link var="img" hippobean=document.image.large/>
                <div class="blog-post-featured-img">
                  <img src="${img}" alt="${document.title?html}" />
                </div>
              </#if>
              <h2>${document.title?html}</h2>
              <div class="blog-post-body">
                <p>${document.introduction?html}</p>
                <@hst.html hippohtml=document.content/>
              </div>
              <div class="blog-post-details">
                <div class="blog-post-details-item blog-post-details-item-left icon-calendar">
                  <#if document.date??>
                    <span class="date">
                      <@fmt.formatDate value=document.date.time type="both" dateStyle="medium" timeStyle="short"/>
                    </span>
                  </#if>
                </div>
              </div>
            </div>
          </div>
        </div>
      </#if>
    </div>
  </div>
</div>
Did you find this page helpful?
How could this documentation serve you better?

See also...

On this page
    Did you find this page helpful?
    How could this documentation serve you better?
    © Bloomreach Inc.
    Terms - Privacy Visit the forum

    代做工资流水公司南京签证流水费用吉林贷款银行流水打印郑州工资流水app截图模板上饶入职工资流水公司宁波办理入职工资流水淮安办理银行对公流水济宁收入证明宿迁代做对公流水苏州银行流水修改模板温州查车贷银行流水商丘查银行流水扬州查询企业对公流水临沂车贷银行流水 图片荆州个人银行流水代开肇庆查询车贷流水大庆开工资流水单南昌流水账单查询珠海办理企业对公流水南宁查薪资流水桂林个人银行流水代开银川贷款流水报价新乡企业银行流水价格杭州车贷工资流水 模板绍兴房贷工资流水 费用莆田房贷银行流水 费用东莞查询消费贷流水长春房贷收入证明价格荆州制作对公银行流水湖州银行流水电子版代做湛江个人银行流水样本香港通过《维护国家安全条例》两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”19岁小伙救下5人后溺亡 多方发声卫健委通报少年有偿捐血浆16次猝死汪小菲曝离婚始末何赛飞追着代拍打雅江山火三名扑火人员牺牲系谣言男子被猫抓伤后确诊“猫抓病”周杰伦一审败诉网易中国拥有亿元资产的家庭达13.3万户315晚会后胖东来又人满为患了高校汽车撞人致3死16伤 司机系学生张家界的山上“长”满了韩国人?张立群任西安交通大学校长手机成瘾是影响睡眠质量重要因素网友洛杉矶偶遇贾玲“重生之我在北大当嫡校长”单亲妈妈陷入热恋 14岁儿子报警倪萍分享减重40斤方法杨倩无缘巴黎奥运考生莫言也上北大硕士复试名单了许家印被限制高消费奥巴马现身唐宁街 黑色着装引猜测专访95后高颜值猪保姆男孩8年未见母亲被告知被遗忘七年后宇文玥被薅头发捞上岸郑州一火锅店爆改成麻辣烫店西双版纳热带植物园回应蜉蝣大爆发沉迷短剧的人就像掉进了杀猪盘当地回应沈阳致3死车祸车主疑毒驾开除党籍5年后 原水城县长再被查凯特王妃现身!外出购物视频曝光初中生遭15人围殴自卫刺伤3人判无罪事业单位女子向同事水杯投不明物质男子被流浪猫绊倒 投喂者赔24万外国人感慨凌晨的中国很安全路边卖淀粉肠阿姨主动出示声明书胖东来员工每周单休无小长假王树国卸任西安交大校长 师生送别小米汽车超级工厂正式揭幕黑马情侣提车了妈妈回应孩子在校撞护栏坠楼校方回应护栏损坏小学生课间坠楼房客欠租失踪 房东直发愁专家建议不必谈骨泥色变老人退休金被冒领16年 金额超20万西藏招商引资投资者子女可当地高考特朗普无法缴纳4.54亿美元罚金浙江一高校内汽车冲撞行人 多人受伤

    代做工资流水公司 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化