Add a display field for the Content Query part

Source: Internet
Author: User
Filter notifications by using the Content Query component. Only the title can be displayed. You need to expand the display of the creator and time.
The effect is as follows:

Method: Find the Style Library -- XSL style sheets -- and itemstyle. XSL files under the website.
Add the code before the last line </XSL: stylesheet>
<XSL: Template Name = "mystyle" match = "row [@ style = 'mystyle']" mode = "itemstyle">
<XSL: variable name = "safeimageurl">
<XSL: Call-Template Name = "outertemplate. getsafestaticurl">
<XSL: With-Param name = "urlcolumnname" select = "'imageurl'"/>
</XSL: Call-template>
</XSL: Variable>
<XSL: variable name = "safelinkurl">
<XSL: Call-Template Name = "outertemplate. getsafelink">
<XSL: With-Param name = "urlcolumnname" select = "'linkurl'"/>
</XSL: Call-template>
</XSL: Variable>
<XSL: variable name = "displaytitle">
<XSL: Call-Template Name = "outertemplate. gettitle">
<XSL: With-Param name = "title" select = "@ title"/>
<XSL: With-Param name = "urlcolumnname" select = "'linkurl'"/>
</XSL: Call-template>
</XSL: Variable>
<XSL: variable name = "linktarget">
<XSL: If test = "@ openinnewwindow = 'true'"> _ blank </XSL: If>
</XSL: Variable>
<Div class = "link-item">
<XSL: Call-Template Name = "outertemplate. callpresencestatusicontemplate"/>
<Table Style = "width: 95%">
<Tr>
<TD> </TD>
<TD style = "width: 50%">
<A href = "{$ safelinkurl}" target = "{$ linktarget}" Title = "{@ linktooltip}">
<XSL: value-of select = "$ displaytitle"/>
</A>
</TD>
<TD style = "width: 20%" align = "Left">
<XSL: value-of select = "@ Author"/>
</TD>
<TD align = "Left">
<Div class = "Description">
<XSL: value-of select = "@ modified"/>
</Div>
</TD>
</Tr>
</Table>
</Div>
</XSL: Template>

Then, configure the following settings on the Content Query component:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.