tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/238-large-menu-foreach-with-different-element-tags-div-ul-li-on-childrenparentsCascade CMS: Discussion 2013-08-20T03:46:51Ztag:help-archives.hannonhill.com,2010-02-09:Comment/186495472012-09-11T14:32:58Z2012-09-11T14:32:58ZLarge menu - foreach with different element tags (div. ul, li) on children/parents <div><p>Hi Matthew,</p>
<p>Quick question, would there ever be a case where there will be a
page or symlink at the first or second level (ie Heading and
Subheading)?</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/186495472012-09-11T14:40:16Z2012-09-11T14:40:16ZLarge menu - foreach with different element tags (div. ul, li) on children/parents <div><p>Hi Ryan,</p>
<p>No at this point only folders with index pages at those levels.
Is it possible to have a page/symlink with children in the
system?</p></div>matthew.nortontag:help-archives.hannonhill.com,2010-02-09:Comment/186495472012-09-11T14:43:35Z2012-09-11T14:43:35ZLarge menu - foreach with different element tags (div. ul, li) on children/parents <div><p>Thank you, that helps a bit. Wasn't sure how flexible those two
levels would need to be.</p>
<p>Only Folders would have children, Pages and Symlinks have
siblings.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/186495472012-09-11T15:25:25Z2012-09-11T15:25:25ZLarge menu - foreach with different element tags (div. ul, li) on children/parents <div><p>This might be a long shot, but let's see how the attached Format
works out.</p>
<p>Note: You might have to adjust some things such as the inline
styling (ie display).</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/186495472012-09-11T17:53:56Z2012-09-11T17:53:56ZLarge menu - foreach with different element tags (div. ul, li) on children/parents <div><p>This is working great Ryan. Velocity is so similar to PHP and
yet handles some things differently. Could you recommend any online
Velocity sites/documentation other then: <a href=
"http://velocity.apache.org/">http://velocity.apache.org/</a></p>
<p>I find that there is limited resources online about the
language.</p>
<p>Thanks again!</p></div>matthew.nortontag:help-archives.hannonhill.com,2010-02-09:Comment/186495472012-09-11T18:11:19Z2012-09-11T18:11:19ZLarge menu - foreach with different element tags (div. ul, li) on children/parents <div><p>Glad to hear that Velocity is helping out. It didn't look the
most elegant but seemed to do the trick.</p>
<p>On thing I noticed in your original Format that you may run into
in the future is that Velocity will complain if you open up an HTML
tag and close it dynamically within a conditional later in your
code (something that could be done in PHP). Take a look at lines
<strong>80</strong> and <strong>82</strong> in your original Format
for an example.</p>
<p>Aside from the Apache Velocity website, we have some <a href=
"http://www.hannonhill.com/kb/Script-Formats/">information on our
knowledgebase</a> that covers some of the tools and helpers that
are available within Cascade. There also are some links to
additional information on various objects in Java such as Dates and
Strings.</p>
<p>You could also check out these two repositories on our Github
for some various examples:</p>
<ul>
<li><a href=
"https://github.com/hannonhill/Velocity-Cookbook">https://github.com/hannonhill/Velocity-Cookbook</a></li>
<li><a href=
"https://github.com/hannonhill/Webinar-Examples/tree/master/Velocity-07-10-2012">
https://github.com/hannonhill/Webinar-Examples/tree/master/Velocity...</a></li>
</ul>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffith