# Navigation

**URL:** <https://discuss.rubyonrails.org/t/navigation/6368>\
**Category:** rubyonrails-talk\
**Created:** [December 27, 2006, 2:10pm UTC](https://discuss.rubyonrails.org/t/navigation/6368 "2006-12-27T14:10:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Norris](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jason\_Norris](https://discuss.rubyonrails.org/u/Jason_Norris)\
**Post date:** [December 27, 2006, 2:10pm UTC](https://discuss.rubyonrails.org/t/navigation/6368/1 "2006-12-27T14:10:22Z")

</div>

instead of link\_to, use link\_to\_unless\_current this will still display the text, but it won't be a link. If you want the text to be hidden, you could write your own method to do it. I would look at the source for link\_to\_unless

172: def link\_to\_unless(condition, name, options = {}, html\_options = {}, \*parameters\_for\_method\_reference, &block) 173: if condition 174: if block\_given? 175: block.arity \<= 1 ? yield(name) : yield(name, options, html\_options, \*parameters\_for\_method\_reference) 176: else 177: name 178: end 179: else 180: link\_to(name, options, html\_options, \*parameters\_for\_method\_reference) 181: end 182: end

and link\_to\_unless\_current

166: def link\_to\_unless\_current(name, options = {}, html\_options = {}, \*parameters\_for\_method\_reference, &block) 167: link\_to\_unless current\_page?(options), name, options, html\_options, \*parameters\_for\_method\_reference, &block 168: end

Naga harish Kanegolla wrote:
