Hi, how can i make an "id" attribute that can be assigned to every voice of the generated menu? For example: <li class="webgen-menu-item-selected" id="homepage"> <span>HomePage</span> </li> <li id="news"> <a href="news.html">News</a> </li> and so on ... Is there an option of MenuStyle, or should I make a plugin? thanks, bye! -- -gaspa- ----------------------------------------------- --------- Powered by Debian GNU/Linux --------- ------ HomePage: iogaspa.altervista.org ------- -Il lunedi''dell''arrampicatore: www.lunedi.org -
> Hi, > how can i make an "id" attribute that can be assigned to every > voice of the > generated menu? > > For example: > <li class="webgen-menu-item-selected" id="homepage"> > <span>HomePage</span> > </li> > <li id="news"> > <a href="news.html">News</a> > </li> > and so on ... > > Is there an option of MenuStyle, or should I make a plugin?If you really want to set the id attribute on the <li> element, you need to write a plugin. However, using the metainfo linkAttrs you can set an id attribute on the <a> or <span> element (note that this attribute gets set on EVERY link/span tag to this page, so if you have more than one link to the same page on one page, you should consider using class instead of id!): just add the following to the meta information for the page files: linkAttrs: id: YOUR_ID_FOR_THIS_PAGE All key-values pairs in linkAttrs get set on a link to this page! *hth*, Thomas
Thanks Thomas,> linkAttrs: > id: YOUR_ID_FOR_THIS_PAGE > All key-values pairs in linkAttrs get set on a link to this page!i tried this, but i cannot make it work. I resolved changing the file: /usr/lib/ruby/1.8/webgen/plugins/menustyles/default.rb in this way: 67 style = "id=\"#{node[''title'']}\"" 68 style << " class=\"#{styles.join('' '')}\"" if styles.length > 0 (without knowing anything of ruby...) bye! -- -gaspa- ----------------------------------------------- --------- Powered by Debian GNU/Linux --------- ------ HomePage: iogaspa.altervista.org ------- -Il lunedi''dell''arrampicatore: www.lunedi.org -