Scenario:
Your CMS allows users to control the content displayed, which includes multiple columns with links underneath. Here is an example layout:
Column name
link1 link2 link3 link4
link5 link6 liiiiiiiiiiiiiiiiiink7
link8 liiiink9 liiiiiiink10
Column name2
link1 link2 link3 link4
link5 link6 liiiiiiiiiiiiiiiiiink7
link8 liiiink9 liiiiiiink10
Column name3
link1 link2 link3 link4
link5 link6 liiiiiiiiiiiiiiiiiink7
link8 liiiink9 liiiiiiink10
Column name4
link1 link2 link3 link4
link5 link6 liiiiiiiiiiiiiiiiiink7
link8 liiiink9 liiiiiiink10
If the list becomes too long, the content will be split into 2 columns. Currently, this is achieved through CSS3 in Mozilla and a jQuery library for IE.
CSS
.columns {
-moz-column-count: 2;
-moz-column-gap: 30px;
-webkit-column-count: 2;
-webkit-column-gap: 30px;
column-count: 2;
column-gap: 30px;
}
### WEB FORM
<!--[if lte IE 9]>
<script src="/Estate/Scripts/Libraries/autocolumn.min.js" type="text/javascript"></script>
<script type="text/javascript">
if (Estate.Sitefinity.IsInEditMode() == false) {
jQuery('#MultiColumn').columnize({
columns: 2,
buildOnce: true
})
}
</script>
<![endif]-->
This client-side approach splits the text without considering the column structure.
Here is the current effect:
The content is now split client-side, but is there a server-side solution that can create two balanced columns? How would you address this issue?