Snippet for TRACY DIC Container (edit ContainerPanel.panel.phtml) to add headings

Notice: This thread is very old.
Member | 7

I just wanted share this little snippet, which creates in DIC tracy window foldable headlines for services names divided by underscore or dot. If many services (what's seems to me usual), it makes easier to read/find.


			$category = preg_split( "/(\.|_)/", $name )[0];
			$category = is_numeric($category) ? "whatsmyname": $category;

			if($previous != $category){ ?>
					<td  style="background:#2c87f0;color:white;" colspan="4">
						<span data-tracy-ref="#<?php echo $category; ?>" class="tracy-toggle tracy-collapsed"><?php echo $category; ?></span>
				<tbody id="<?php echo $category; ?>" class="tracy-collapsed">
				$previous = $category;
			} ?>