Pagination url problem


I want to generate the sitmap, and i have written the code for that.
Here beacuse of some inner pagination, I want to get the urls in this

in sitemap controller

    @catalog_sub_urls = Community.find(:all, :conditions => ['name LIKE
?', "#{'B'}%"])

in view sitemap.rxml

     i , j = 0 , 1
  @catalog_sub_urls.each do |sub_url|
    i = i + 1
    if i > 50
      j = j + 1
       @inner_urls =
       @inner_urls =
  @inner_urls.each do |url|
      xml.tag! 'url' do
        xml.tag! 'loc', url
        xml.changefrq 'daily'

The poblem is with this line
@inner_rls =

I want it to generate incremented values of j.. But not getting the ways
to do the same. Or let me know what I am doing is completely wrong
way.Pls Help me.. its urgent.

Thanx in advance.

put this line in double quote.



This should work

Sandip R~