i'm building extension typo3, extend pages
table of typo3 core field.
description of problem:
the field mm relation own record, containing description, images , on... because extension doesn't provide own plugin (it's general site extension, providing sites templates , on) have access new fields of pages
record via fluid template. but, accessing field within pages info array (with <v:page.info field="myfield" ... />
or {data.myfield}
), current count of referenced rows (the value of database column in pages-record).
so, questions are:
how can access contents of additional field in fluid template, forcing typo3 recognize jump on mm table referenced records? whats usual "typo3-way" that?
or have write own viewhelper getting references between 2 records?
- are there typoscript solutions this?
what tca (extended pages) looks like:
$temporarycolumns = array( 'tx_user_myext_myfield' => array( /* ... smaller unimportant tca settings here ... */ 'config' => array( 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'tx_user_myext_mycustomrow', 'foreign_table' => 'tx_user_myext_mycustomrow', 'mm' => 'tx_user_myext_mycustomrow_pages_mm', 'mm_hasuidfield' => 1, 'multiple' => 1 ) ) );
(of course, pass $temporarycolumns
addtcacolumns
, addtoalltcatypes
. backend functionality works fine - that's not problem.)
edit: can't build plugin that, because it's general part of website. (so, settled in template.) record relations should changeable user.
i hope can me; thank reply question.
the best way extend/create page model , create plugin showing stuff.
it possible typoscript
myrecords = content myrecords { table = tx_user_myext_mycustomrow select { pidinlist = root,-1 selectfields = tx_user_myext_mycustomrow.* join = tx_user_myext_mycustomrow_pages_mm on tx_user_myext_mycustomrow_pages_mm.uid_local = tx_user_myext_mycustomrow.uid where.data = field:_orig_uid // field:uid where.intval = 1 where.wrap = tx_user_myext_mycustomrow_pages_mm.uid_foreign=| orderby = tx_user_myext_mycustomrow_pages_mm.sorting_foreign } renderobj = coa renderobj.10 = text renderobj.10.field = somefield renderobj.10.wrap = <h1>|</h1> } # add myrecords fluid variables. assume fluidtemplate in page.10 page.10.variables.myrecords < myrecords
in fluid:
<f:render.raw>{myrecords}</f:render.raw>
as see ts solution has no relation fluid since html build in ts. advice going way own plugin. takes not time add relation field page model , create small plugin , training further development.
Comments
Post a Comment