Today We are going to learn Typoscript Page Condition [page["uid"] == 2] Include Css, Js For Specific Page, Here there is requirement in site that about us page has separate css and we need to include only for about us page or specific page uid, page id at that time we just include this typoscript, note that you must include page.includeCSS, typoscript condition end with [global]
page = PAGE
page {
........
}
Put it after above code
[page["uid"] == 2]
page.includeCSS.about = EXT:defaultsite/Resources/Public/styles/about_styles.css
page.includeCSS.aboutresponsive = EXT:defaultsite/Resources/Public/styles/about_responsive.css
[global]
No comments:
Post a Comment
your suggestion are welcome by me