tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/672-change-font-weight-of-current-menu-itemCascade CMS: Discussion 2015-09-22T21:05:56Ztag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-04T14:38:03Z2013-01-04T14:38:03ZChange font-weight of current menu item<div><p>I believe what you need to do is, instead of checking the
"current" attribute, check for whether the full path of the current
page contains the path of the $item page.</p>
<p>I think replacing this line</p>
<pre>
<code> #if ($result != '' || $item.getAttribute('current').value == "true")</code>
</pre>
<p>with</p>
<pre>
<code> #if ($result != '' || $currentpath.contains($item.getAttribute('path').value))</code>
</pre>
<p>will do it, but I haven't tested it.</p></div>Eric L. Eppstag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-04T14:56:04Z2015-09-22T21:05:55ZChange font-weight of current menu item<div><p>Thanks Eric. Really appreciate your help.<br>
This didn't work.</p></div>ssargamtag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-04T16:19:21Z2013-01-04T18:00:59ZChange font-weight of current menu item<div><p>Sorry my code didn't work, but the technique should. That's how
I do it<br>
for our left navigation, but I'm using XSL so I don't have the
Velocity<br>
syntax handy.</p></div>Eric L. Eppstag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-04T16:40:49Z2015-09-22T21:05:56ZChange font-weight of current menu item<div><p>Thanks again, Eric. I am also new to velocity, so finding it
hard to make it work.<br>
Thanks for your guidance.Really appreciate it.</p></div>ssargamtag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-08T15:50:48Z2013-01-08T15:50:48ZChange font-weight of current menu item<div><p>Hi,</p>
<p>When you have a moment, would you be able to attach the output
of your Index Block to help with local testing? If you can, a copy
of <code>$contentRoot</code> on your <em>Services</em> page would
be ideal. You should be able to do this by placing the following at
the top your Format:</p>
<pre>
<code>$_SerializerTool.serialize($contentRoot, false)</code>
</pre>
<p>and copying the XML generating within the page's source
code.</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/234288522013-01-08T16:03:23Z2015-09-22T21:05:56ZChange font-weight of current menu item<div><p>Hi Ryan;</p>
<p>Earlier the rendering behavior was: Render normally, starting at
the indexed folder<br>
This was great as rendering time was significantly less but bolding
current menu item was an issue as I stated here.<br>
But now, I changed rendering behavior to: Start at the current page
with folder hierarchy, siblings, and also render forward</p>
<p>this solves my bolding issue but rendering time is a little
more( from 9secs to 55secs per page)</p>
<p>Would your above method have some alternate affect?</p>
<p>Thanks a lot for your help, really appreciate it.</p></div>ssargamtag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-08T16:19:54Z2013-01-08T16:19:54ZChange font-weight of current menu item<div><p>Hi,</p>
<p>Glad to hear you were able to get things to work. I was curious
if there was an issue with your Index Block setup.</p>
<blockquote>
<p>But now, I changed rendering behavior to: Start at the current
page with folder hierarchy, siblings, and also render forward...
this solves my bolding issue but rendering time is a little more(
from 9secs to 55secs per page)</p>
</blockquote>
<p>Are you including page content or any other unnecessary content
within your Index Block by chance? This can definitely increase the
size of the Index Block and have an affect on the speed of your
Format.</p>
<blockquote>
<p>Would your above method have some alternate affect?</p>
</blockquote>
<p>This line is just a way to view and debug the XML that is
generated by the Index Block on the calling page, so it would not
change the way your Format functions and would be removed when no
longer needed.</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/234288522013-01-08T16:30:15Z2015-09-22T21:05:56ZChange font-weight of current menu item<div><p>I see. I don't think there is page content but whenever I get a
chance to look at it, I will.</p>
<p>Thanks again, this gave me a better idea about blocks I'll let
you know if I have any additional questions.</p></div>ssargamtag:help-archives.hannonhill.com,2010-02-09:Comment/234288522013-01-08T16:55:42Z2013-01-08T16:55:42ZChange font-weight of current menu item<div><p>Definitely take a look at the <em>Render page content</em>
options, these are usually the first place to look when trying to
optimize Index Blocks.</p>
<blockquote>
<p>Thanks again, this gave me a better idea about blocks I'll let
you know if I have any additional questions.</p>
</blockquote>
<p>Glad to hear, if you haven't seen this already, we have some
<a href="http://hannonhill.com/kb/Index-Block/">additional
information about Index Blocks</a> on our Knowledge Base.</p>
<p>Have a great day!</p></div>Ryan Griffith