[TYPO3-mvc] Get content From parent Element.
Denis
demonking at hotmail.de
Mon Apr 29 15:18:32 CEST 2013
Hello Community,
i have googled the last 2 days, but haven't found anything with this problem.
I have written an Extbase Extension and it ist near finish, but i have a problem.
You can create Entry's and show it on different pages.
Entry Attributes:
-title
-description
-entryimage
So, when i create my Entry with the default Language, i fill all elements.
No, i create a Second Langugage of the same Entry.
I works fine and show me, what i want.
The image which is selected is, from the default language.
But how can i show it in the fluid template?
Everytime i try it, the imagebox is empty.
My Repository :
// Entry -> Entrytype is an n:m relation
public function findAllEntry($type){
$query = $this->createQuery();
$query->matching($query->like('Entry.type',$type));
return $query->execute();
}
My template:
<f:layout name="default" />
<f:section name="content">
<f:for each="{Entrys}" as="EntryList">
<f:for each="{EntryList}" as="Entry">
<f:if condition="{Entry}">
<f:then>
<div class="Entrycontainer">
<div class="imageBox">
<f:if condition="{Entry.image}">
<f:then>
<f:image src="{imageFolder}/{Entry.image}" alt="Entry Bild" maxWidth="150m" />
</f:then>
</f:if>
</div>
</f:then>
</f:if>
</f:for>
</f:for>
</f:section>
My TCA of the Image:
'entry_image' => array(
'exclude' => 0,
'label' => 'LLL:EXT:testextension/Resources/Private/Language/locallang_db.xml:testextension_domain_model_entry.entry_image',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'uploadfolder' => 'uploads/testextension',
'show_thumbs' => 1,
'size' => 5,
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'disallowed' => '',
),
Hope someone could help :/
Sorry for my English, at the moment it is not so good, but i'm still learning.
Greetz
Denis
More information about the TYPO3-project-typo3v4mvc
mailing list