List Info

Thread: list of all pages in a sidebar




list of all pages in a sidebar
user name
2007-02-18 16:29:57
I'd like to put the list of all pages in a sidebar.  I see I
can put
something like this on my home page:

    <div style="float:right;">

    h3. Index
    [[!include list]]

    </div>

However it doesn't work.  First, list is unknown and second,
if it did
work, it appears that include only works when the home page
is
updated.  So how could I get a dynamic list or table of
contents in a
sidebar?

Michael Grant
_______________________________________________
Instiki-users mailing list
Instiki-usersrubyforge.org
h
ttp://rubyforge.org/mailman/listinfo/instiki-users

Re: list of all pages in a sidebar
user name
2007-02-26 11:39:27
Michael,

Sounds interesting; however, there are a couple of assumptions here. In order to keep the sidebar current, the list would need to be updated often. I imagine there would be performance issues in doing this but I imagine that is not a primary concern if you few enough wiki pages to fit in a sidebar.

Question, how would you want the pages organized? Via a "tree" or alphabetical?

Not sure what variables are available to you in the layout, but in the appsviewslayoutsdefault.rhtml I do see the web variable which should be all you need, then you could do something like this (but this is just a non-tested, non-formatted guess):
  <% for page in web.select.sort %>
&nbsp; &nbsp; <%= link_to page.plain_name, :web => web.address, :action => 'show&#39;, :id => page.name %>
&nbsp; <% end %>

Thanks,
Johannes

On 2/18/07, Michael Grant < mgrantgrant.org">mgrantgrant.org> wrote:
I'd like to put the list of all pages in a sidebar.&nbsp; I see I can put
something like this on my home page:

&nbsp; &nbsp; &lt;div style=&quot;float:right;"&gt;

 &nbsp;  h3. Index
&nbsp; &nbsp; [[!include list]]

&nbsp; &nbsp; </div>;

However it doesn't work. ; First, list is unknown and second, if it did
work, it appears that include only works when the home page is
updated. &nbsp;So how could I get a dynamic list or table of contents in a
sidebar?

Michael Grant
_______________________________________________
Instiki-users mailing list
Instiki-usersrubyforge.org">Instiki-usersrubyforge.org
http://rubyforge.org/mailman/listinfo/instiki-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )