Changing default image width of 600 px in TYPO3 Version 9

Typo3 by default limits image width to 600 px. You can easily change this setting using TypoScript. These TypoScript can be usually located on the root Template record. If not you can try using the object browser to find the exact location.

You can change TYPO3 default image size in setup and in constants of the the base template record. You need to login to the bckend in order to edit the TYPO3 backend template record.

The following TYPOSCRIPT is applicable to TYPO3 version 7 onwards including TYPO3 version 9

styles {
content {
textmedia {
# maximum width of generated images
maxW = 2400
# maximum width of generated images (beside text)
maxWInText = 2400
# column spacing in pixels for multiple image columns
columnSpacing = 10
# row spacing in pixels for multiple image rows
rowSpacing = 10
# spacing to the text
textMargin = 10
}
}
}

If you are looking forward to change the image size in TYPO3 version 6 or lower the code is bit different as follows:

In CONSANTS:
styles.content.imgtext.maxW = 700

In SETUP:
tt_content.image.20.maxW = 930

This article was first published on 3rd October 2009!

Typoscript to get database values in Breadcrumb

lib.breadcrumb = COA
lib.breadcrumb.wrap = <ul class=”breadcrumb hidden-xs”>|</ul>
lib.breadcrumb {
10 = HMENU
10 {
special = rootline
special.range = 0|-1
1 = TMENU
1 {
no.allwrap = <li>|</li>
no.stdwrap.htmlspecialchars = 1
cur = 1
cur {
allwrap = <li>|</li>
donotlinkit = 1
stdwrap {
data = page:subtitle // page:nav_title // tsfe:page|title
htmlspecialchars = 1
}
}
}
wrap >
}
20 = CONTENT
20 {
table = country
select {
pidInList = 605
where = uid= ###whatever### AND NOT deleted AND NOT hidden
markers {
whatever.data = GP:tx_country|country
}
}
renderObj = COA_INT
renderObj {
10 = TEXT
10.field = name
10.stdWrap.typolink.parameter = 610
10.stdWrap.typolink.additionalParams = &tx_country[country]={GP:tx_country|country}
10.stdWrap.typolink.additionalParams.insertData = 1
10.wrap = <li>|</li>
}
}
30 = CONTENT
30 {
table = city
select {
pidInList = 606
where = uid= ###whatever### AND NOT deleted AND NOT hidden
markers {
whatever.data = GP:tx_country|city
}
}
renderObj = COA_INT
renderObj {
10 = TEXT
10.field = name
10.wrap = <li>|</li>
}
}
}

That’s it

Output will be like this

Section Index menu to link perticular content in other page

Here is the typoscript

tt_content.menu.20.3 >
tt_content.menu.20 {
3 < styles.content.get
3.wrap = <div class=”csc-menu csc-menu-3″>|</div>
3.select.andWhere = sectionIndex!=0
3.select.pidInList.override.field = pages
3.renderObj = CASE
3.renderObj {
key.field = header_layout
default = COA
default {
stdWrap.fieldRequired = header
stdWrap.fieldRequired = header_link
10 = TEXT
10.field = header
10.trim = 1
10.htmlSpecialChars = 1
10.dataWrap = <p class=”csc-section-1″>|</p>
#10.typolink.parameter.field = pid
#  Where header_link is a link field in content element (542#210) where 542 is page ID and # # 201 is content id to link
10.typolink.parameter.field = header_link

}
1 < .default
2 < .default
2.10.dataWrap = <p class=”csc-section-2″>|</p>
3 < .default
3.10.dataWrap = <p class=”csc-section-3″>|</p>
4 < .default
4.10.dataWrap = <p class=”csc-section-4″>|</p>
5 < .default
5.10.dataWrap = <p class=”csc-section-5″>|</p>
}
}

Typoscript to show filesize in FAL

Here is the code to show file size in terms of kilobytes,Megabytes and Gigabytes

lib.image = FILES
lib.image {
references {
table = tt_content
fieldName = media
}
renderObj = COA
renderObj {
10 = TEXT
10.data = file:current:size
10.bytes.labels = Bytes | KB | MB | GB
10.dataWrap = <a target=”_blank” href=”{file:current:publicUrl}” >{file:current:title},&nbsp; |</a>
}
}

TYPO3 adding section frames.

Below is the way how we can add the section frames by preserving the content element ID. This way works on TYPO3 6.x.

1. In TS template

### FRAMES ###
tt_content.stdWrap.innerWrap.cObject {
100 < tt_content.stdWrap.innerWrap.cObject.default
100.20.10.value = boxclass
}

2. In page TS Config

TCEFORM.tt_content.section_frame {
addItems.100 = My custom box
}