2014-01-14 4 views
0

"세부 정보"보기가있는 제품 확장이 있습니다. "제품"레코드는 ID가 5 인 폴더에 보관됩니다. 제품을 사용 중일 때 해당 폴더의 모든 제품에 대한 링크가있는 메뉴가 필요합니다. Typoscript에서이 기능을 사용할 수 있습니까?여러 레코드가있는 Typo3 extbase - HMEN

감사합니다.

+0

, 그래서 플러그인을 결국 이것 때문에. – cili

답변

1

TypoScript를 사용하여 모든 것을 할 수 있습니다 :-).

lib.productList = CONTENT 
lib.productList { 
    table = tx_myext_domain_model_product 
    select { 
    # sorting criterion 
    orderBy = tstamp DESC 
    # PID list 
    pidInList = 46,47 
    # Maybe restrict the number of results 
    max = 20 
    } 
    # Each result must be rendered like this 
    renderObj = COA 
    renderObj { 
    1 = TEXT 
    # Each field from your table can be used 
    1.field = title 
    1.wrap = <h1>|</h1> 

    2 = TEXT 
    2.field = description 
    # If one field contains rich text, you can apply RTE parsing to it 
    2.parseFunc < lib.parseFunc_RTE 
    } 

} 

이제 유체 템플릿의 목록을 표시 할 cObject ViewHelper을 사용할 수 있습니다 : 나는이 문서를 통해 탐색하고 시작점을 찾을 수 없습니다

<f:cObject typoscriptObjectPath="lib.productList"></f:cObject>