【问题标题】:Octobercms YAML select十月cms YAML 选择
【发布时间】:2016-05-14 16:36:53
【问题描述】:

我现在如何能够在 Octobercms 的 YAML 配置中选择另一个表,我有这样的:

season:
    label: Season
    type: relation
    select: concat(title, ' - ', ' Season ', number)

选择标题和数字,但我想做的是选择多个表并使用 concat 来选择特定的列。

从下面的答案中,我已经尝试过了,但我不知道从那里去哪里。基本上来自它包含的剧集 feild.yaml:

    season:
        label: Season
        descriptionFrom: description
        span: auto
        type: partial
        path: ~/plugins/test/movie/models/season/_content_column.htm

我希望能够获取该剧集与电影相关的季节。以前的代码是一个关系,显示“所有”季节。我想显示在电影中创建的该电影的特定季节,以显示在该剧集的下拉列表中以供选择。

【问题讨论】:

    标签: php mysql laravel yaml octobercms


    【解决方案1】:

    您可以通过partial column手动从不同的表中进行多项选择。

    【讨论】:

    • 我将如何应用这个?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-07-21
    • 1970-01-01
    • 2019-01-13
    • 1970-01-01
    • 2018-04-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多