# How to draw the tree in a “pitchfork” form?

How to set the options or other parameters in a TreePlot to draw the branching outside of the vertex? I.e. in a form similar to a dendrogram (but the dendrogram plot itself does not support the vertices).

Some as an example in the figure ClearAll[zigzag]
zigzag[][{{a_, b_}, {c_, d_}}, ___] := Line @
{{a, b}, {(a + c)/2, b}, {(a + c)/2, d}, {c, d}}
zigzag["Vertical"][{{a_, b_}, {c_, d_}}, rest___] := Map[Reverse,
zigzag[][{{b, a}, {d, c}}, rest], {2}]


Examples:

vlabels = "v" <> ToString @ # & /@ Range
edges = {1 -> 2, 1 -> 3, 3 -> 4, 3 -> 5};

Graph[Range, edges,
VertexLabels -> {v_ :> Placed[vlabels[[v]], Center]},
VertexStyle -> White,
VertexLabelStyle -> 16,
VertexShapeFunction -> "Square",
VertexSize -> Large,
EdgeStyle -> Directive[Thick, Black],
EdgeShapeFunction -> zigzag[],
GraphLayout -> {"LayeredEmbedding", "Orientation" -> Left}] With "Orientation" -> Right we get For Top and Bottom orientations use zigzag["Vertical"]:

Graph[Range, edges,
VertexLabels -> {v_ :> Placed[vlabels[[v]], Center]},
VertexStyle -> White,
VertexLabelStyle -> 16,
VertexShapeFunction -> "Square",
VertexSize -> Large, EdgeStyle -> Directive[Thick, Black],
EdgeShapeFunction -> zigzag["Vertical"],
GraphLayout -> {"LayeredEmbedding", "Orientation" -> Bottom}] Using "Orientation" -> Top gives SeedRandom

TreeGraph[RandomInteger[{1, #}] \[UndirectedEdge] # + 1 & /@ Range,
ImageSize -> Large, VertexLabels -> Placed["Name", Center],
VertexStyle -> White, VertexShapeFunction -> "Square",
VertexSize -> Large, EdgeStyle -> Directive[Opacity, Gray],
EdgeShapeFunction -> zigzag["Vertical"]] 