<div>Hi Deb,</div>
<div> </div>
<div>thanks for your answer!</div>
<div> </div>
<div>I got this working now:</div>
<div> </div>
<div><li mv:attr=":class => #{ controller.controller_name == 'home' ? 'selected' : 'not_selected'}"><br> <a href="../home/index.html" mv:link_to=":controller => 'home', :action => 'index'">Home</a></li>
</div>
<div> </div>
<div>However, I couldn't get your other idea working:</div>
<div> </div>
<div><li> <a href="../home/index.html" mv:link_to=":controller => 'home', :action => 'index'">{{{= controller.controller_name == 'home' ? '<span class="selected">Home</span>' : 'Home' }}}</a></li>
</div>
<div> </div>
<div>This doesn't compile. Also, if I this was working, the static html would be wrong, as the Link text "Home" would be missing, right? So I would have to include a dummy element.</div>
<div>However, I don't now how to get that working either: I tried to format the "Home" menu option using the selected class in the static html page,</div>
<div>just to get an idea of how a selected menu will look like. I tried this:</div>
<div> </div>
<div>
<div><li mv:attr=":class => #{ controller.controller_name == 'home' ? 'selected' : 'not_selected'}"><br> <a href="../home/index.html" mv:link_to=":controller => 'home', :action => 'index'">
<font color="#3333ff"><span class="selected" mv:replace="">Home</span></font> </a></li> </div>
<div> </div>
<div>But it doesn't compile. My guess is there is a conflict with the mv:link_to directive which just expects a string, not a string with another nested mv directive.</div>
<div> </div>
<div>Anyway, I'm already quite happy with my current solution, thanks.</div>
<div> </div>
<div>Something else I noticed:</div>
<div> </div>
<div>Why does masterview change the formatting of my html? For instance </div>
<div> </div>
<div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
</a></div>
<div><html lang="en" mv:import="layouts/admin.rhtml" xml:lang="en" xmlns="<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.w3.org/1999/xhtml" target="_blank">
http://www.w3.org/1999/xhtml</a>"></div>
<div> </div>
<div>becomes </div>
<div> </div>
<div><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E%3Chtml" target="_blank">
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html </a>lang="en" mv:import="layouts/admin.rhtml" xml:lang="en" xmlns="<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.w3.org/1999/xhtml" target="_blank">
http://www.w3.org/1999/xhtml</a>"></div>
<div> </div>
<div>so the linebreak is ignored.</div>
<div> </div>
<div>I think I saw such more or less sutbtle changes in other places as well. But I can't remember where right now. I think tabs were ignored.</div>
<div>I'd prefer the formatting not beeing touched by masterview.</div>
<div> </div>
<div>Kind Regards,</div>
<div>Nico</div>
<div> </div>
<div> </div></div>