在 Typoscript 中使用变量 "select"

Use a variable in Typoscript "select"

我尝试获取 Typo3 站点的作者,然后我尝试使用生成的 ID 填充 Typo3 select(打字稿)。 它以某种方式工作,但我不能将 lib oder 变量用作另一个 select

的数据源

我试着用 LOAD_REGISTER 或标记来玩。但我认为它必须是一种使用 select 结果或另一个 "lib" 结果的方法 select.

这是我的代码:

// Returns succsessfully "neuz8" and i can use this in fluid
lib.author = TEXT
lib.author.data = page:author

lib.Authornavigation = CONTENT
lib.Authornavigation {
    stdWrap.required = 1
    table = be_users
    select {
        uidInList = 0
        pidInList = root
        selectFields = be_users.uid as id, be_users.realName as rn, be_users.profile_pid as prid
        where = be_users.profile_pid != '0'
        andWhere =  be_users.realName={lib.author} // Is not working, why?
        // I tryed: combinations of andWhere.data or lib.author.data, 
        // with and without {}, 
        // with LOAD_REGISTER, 
        // with "markers", 

        //andWhere =  be_users.realName='neuz8' < this works and returns "39", the correct ID
        andWhere.wrap =
        markers {
            //author.data = {page:author}
        }
    }
    renderObj = COA
    renderObj {
        10 = TEXT
        10.field = prid
        10.wrap2  =  ###SPLITTER### |
    }
    stdWrap.split {
        token = ###SPLITTER###
        cObjNum = 1 |*| 2 |*| 1
        1.current = 1
        2.current = 1
        2.wrap = |,
    }
}

这应该有效

替换

// andWhere =  be_users.realName={lib.author} // Is not working, why?

andWhere = be_users.realName= 
andWhere.postCObject < temp.author

你可以试试select.markers:

page.60 = CONTENT
page.60 {
  table = tt_content
  select {
    pidInList = 73
    where = header != ###whatever###
    orderBy = ###sortfield###
    markers {
      whatever.data = GP:first
      sortfield.value = sor
      sortfield.wrap = |ting
    }
  }
}

Docs » Functions » select(见部分标记)