typoscript

Getting back after a long gap

scwebs-logo

SCWEBS Info Solutions PVT LTD, is already 3 years old Indian Company. The journey through these years had been really tough and challenging. Together with my experience in Chandan Web Solutions, our total TYPO3 expertise rises to 10+ years. I was involved with TYPO3 since version 3.8, but within 6 months of knowing TYPO3 the version 4.0 came in.

Since beginning we just had TYPO3 as our main and core expertise. It is during the year 2016 till date, that we started gathering knowledge in several other areas. Our main goal was not just to have a peek into these new technologies, but to have in-depth subject expertise in what we learn.

On one hand we learnt new CMS systems like Drupal, WordPress, and Joomla. On the other hand we explored some of the core PHP frameworks like Symfony, Laravel and CakePHP.

E-Commerce systems like WooCommerce and Prestashop remained on top of our pick list Finally Magento was completely dropped off from our palette.

Quality always came at a price, and we always had a good struggle to prove ourselves on our prices. Initially it had been extremely tough time convincing our European friends that we could really work on TYPO3!

Our TYPO3 journey started with TYPO3 version 3.8. When we started working on TYPO3 4.x I met Francois Suter. This was never possible without the help of my TYPO3 Guru Francois Suter. Who carefully carved me and gave in-depth ideas about TYPO3.

Today, we are working hard to migrate nearly 20+ websites from TYPO3 version 4.5 and TYPO3 version 4.6. This list also had two peculiar website that ran TYPO3 version 3.8 which is already migrated to TYPO3 version 9. One peculiar issue that we are facing is with RealURL, which we must soon overcome.

Along with these, we are also working on a good WooCommerce based solution, and a custom WordPress integration as well. Product development is also on the card, which is soon going to kick off.

Year 2018 is getting busier, and we are happy that we are getting back on. Our site had been helpful for TYPO3 community for quite many years. Since last few years this had changed. I am also planning to write more on technical side. This time the concetration will be on my entire technical knowledge, and not just on TYPO3. There is also an article waiting for a simple step to migrate TYPO3 to version 9.

We are also updating our website with a new year 2018 theme. This new site, which is all colorful, is going to showcase our TYPO3 skills, as well as our new expert areas.

Finally I WISH YOU ALL READERS a HAPPY and PROSPEROUS NEW YEAR.

scwebs-logo-mini

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
}