get - TYPO3 getting image from page content -


i'm working on first typo3 project , i'm done template, can't figure out how make work:

my page content 1 column header, text , title in every field. don't have problems showing header , text on website, image won't work. image-path fileadmin/user_upload/ , can show setting filename in code, thats not want. content object array, code image 1 of versions found when searching, none of them worked:

page.20 = content page.20.table = tt_content page.20.wrap = <div id="content">|</div>  page.20.renderobj = coa page.20.renderobj.wrap = <div id="news">|</div> page.20.renderobj {    10 = text     10.stdwrap.field = header   10.stdwrap.wrap = <div id="newstitle"><span>|</span></div>    20 = image   20.stdwrap.field = image   20.stdwrap.wrap = <div id="newsimage><img src="fileadmin/user_upload/|"</img></div>    30 = text     30.stdwrap.field = bodytext   30.stdwrap.wrap = <div id="newstext"><p>|</p></div> } 

hope me out, can finish project!

maybe don't understood correctly, but... don't need write yourself, in main ts template include css styled content extension, can render whole column like:

page.20 < styles.content.get 

if need change wrappings (i.e.: add news css classes) can override them in setup field.

edit: go templates > template analyzer , check ext:css_styled_content/static/ code find declaration you'd change (prepare looong reading ;)) when find it, can overwrite in ts, ie: wrap text section of text w/ image ce can use:

tt_content.textpic.20.text.wrap = <div class="mynewsclass"> | </div> 

finally i'd suggest not replace original classes add own above sample like:

tt_content.textpic.20.text.wrap = <div class="csc-textpic-text mynewsclass"> | </div> 

de facto these classes csc- has css default styling therefore can choose align image left or right (etc) out of box. if you'll remove you'll need handle these things yourself.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -