tionTemplate的relatedContent区域中换行

tionTemplate的relatedContent区域中换行

本文介绍了在TVML的compilationTemplate的relatedContent区域中换行描述文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

如何将description文本包装在compilationTemplaterelatedContent区域中?

How can I wrap the description text in the relatedContent area of a compilationTemplate?

我的description标签:

<description style="tv-text-style: none; font-size:36; font-weight:regular; word-wrap:break-word;">lorem ipsum dolor sit amet consectetur adipiscing elit</description>

完整模板:

var Template = function() { return `<?xml version="1.0" encoding="UTF-8" ?>
    <document>
        <compilationTemplate theme="light">
            <list>
                <relatedContent>
                    <itemBanner>
                        <heroImg src="${this.BASEURL}images/shows/bates/BRANDHD2398_AEN_BATE_168121_TVE_000_2398_60_20160303_00_S3_REV_HD_1920x1080-16x9.jpg" />
                        <description style="tv-text-style: none; font-size:36; font-weight:regular; word-wrap:break-word;">lorem ipsum dolor sit amet consectetur adipiscing elit</description>
                    </itemBanner>
                </relatedContent>
                <header>
                    <title>Bates Motel</title>
                    <subtitle>Season 4</subtitle>
                </header>
                <section>
                    <listItemLockup>
                        <ordinal minLength="2">1</ordinal>
                        <title>A Danger to Himself and Others</title>
                        <decorationLabel>11:14</decorationLabel>
                    </listItemLockup>
                    < !-- ... -- >
                </section>
            </list>
        </compilationTemplate>
    </document>`
}

文字大小会发生变化,但说明会被截断而不是换行到下一行.

The text size changes, but the description truncates instead of wrapping to the next line.

推荐答案

使用min-heightmax-height样式修改预定义的说明区域使用tv-text-max-lines. https://github.com/iBaa/PlexConnectApp中的示例/blob/master/PlexConnectApp/TVMLTemplates/Fanart/Movie_PrePlay.xml ,请参见class description和更高版本.

Modify pre-defined description area with tv-text-max-lines. Example in https://github.com/iBaa/PlexConnectApp/blob/master/PlexConnectApp/TVMLTemplates/Fanart/Movie_PrePlay.xml, see class description and later usage.

(根据评论和仔细检查,于2014年4月14日编辑)

(Edited 14Apr16 based on comment and double-check)

这篇关于在TVML的compilationTemplate的relatedContent区域中换行描述文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 07:22