views:

71

answers:

5

for example

http://www.sitename.com/section1/pagename.aspx

http://www.sitename.com/section2/pagename.aspx

I need quick report only for pages which has same name. like "pagename.html" in example.

+1  A: 

crawl your site, reverse the found URLs and sort?

No Refunds No Returns
site is on staging server
metal-gear-solid
A: 

If this is a Sitecore site as I'm led to believe, could you not just go into the Content Editor and search for the name you're looking for? Anything with the item name of "pagename", for example, will have a URL ending with "pagename.aspx" in your standard Sitecore install. Just make sure you're looking at the actual item name and not the display name, as they can be quite different at times depending on how you've got the URL's set up.

dhulk
but i'm in multisite environment. how to do search only for one site
metal-gear-solid
Are the sites in the same Sitecore instance?
dhulk
@dhulk - yes - all site are in same content editor tree
metal-gear-solid
in that case you should still be able to look for all items regardless of what site they're on through the search feature in the content editor
dhulk
A: 

I would write a quick utility program to just traverse the content tree programmatically, saving the names to a dictionary... when you hit an item that is already in the dictionary, you've got a name collision.

Bryan
A: 

One thing you might consider is writing a filter (I think that is what it is called) for this

http://trac.sitecore.net/AdvancedSystemReporter

That would allow you to have a nice interface in Sitecore for viewing duplicate item names.

Gabriel Boys
A: 

How big is your database, and how is your LINQ to Objects? Theoretically you could write a LINQ query against Database.Items that looks for items with the same name that descend from the same site branch of your content tree. This could be very memory intensive if your master DB is large, but would not be difficult to code.

Edit -- if you can loop over all your site items, you could do something like this (untested):

        var items = siteItem.Axes.GetDescendants();
        var dupes = from item in items
                    join item2 in items on item.Name equals item2.Name
                    where item.ID != item2.ID
                    select item;
techphoria414