Adding content if parent has special type

Silverstripe Version:
4.0.2

Question:
I have a spacial type of section. Is It possible make something like if Parent has “name if type” (for me is name of type: Projects) and than some of code… because I dont want have that code on all pages - I want submenu only in this subpages.

If I understand your question correctly, you want to have some logic that can output code when the parent page is for instance ‘ProjectsPage’?

<body>
<% if $Parent.ClassName.ShortName == 'ProjectsPage' %>
	<div class="hasParentOverviewPage">
        <div>$SomeOtherLayout</div>
		$Layout
	</div>
<% else %>
	<div class="inner typography line">
		$Layout
	</div>
<% end_if %>

</body>