ASPX templates
Version 5.x > ASPX templates > Path Expression to ignore subfolders View modes: 
User avatar
Member
Member
Blake - 6/2/2011 10:32:33 AM
   
Path Expression to ignore subfolders
Using a DataList, I'm trying to find a path expression to display all the document types found underneath a given page, but NOT display any of the same document types found under any sub-pages.

Ex:
-Main Page
--Document A
--Document B
--Document C
-----Sub Page
----------Document X
----------Document Y
----------Document Z

I would like to only list out Document's A, B, C.

Any Paths I've tried (<blank>, %, etc.) will display A, B, C, X, Y, and Z on the MainFolder, and then SubFolder will show just X, Y, and Z.

Is there a Path Expression that will only load A, B, C on the main, ignoring any of the others beneath it?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/2/2011 10:27:33 PM
   
RE:Path Expression to ignore subfolders
Hello,

Could you please try to configure the property Maximum nesting level to 1? This should help you to get the desired outcome.

Best regards,
Boris Pocatko

User avatar
Member
Member
Blake - 6/3/2011 7:31:53 AM
   
RE:Path Expression to ignore subfolders
I set MaxRelativeLevel="1" and it's working great. That's exactly what I needed, thanks Boris!

User avatar
Member
Member
lancetek - 6/3/2011 11:09:40 AM
   
RE:Path Expression to ignore subfolders
kentico_borisp wrote: Hello,

Could you please try to configure the property Maximum nesting level to 1? This should help you to get the desired outcome.

Best regards,
Boris Pocatko


Sorry to hijack this thread but, is there a way to filter out subpages you don't want showing using a macro or something? eg I don't want to see 'Document X' or 'Document Y' but would like to see the other subpages?

Cheers,
Lance

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/4/2011 2:03:29 AM
   
RE:Path Expression to ignore subfolders
Hi,

you could uncheck option Show in navigation in Properties of document, Menu tab.

If the document should be a part of navigation (on some other page), you could define Where condition in properties of the navigation web part to filter requested documents.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
sunil-orlandoescape - 11/3/2011 8:31:09 AM
   
RE:Path Expression to ignore subfolders
We are using expression web and google webmaster tools shows many crawl errors example like nesting sub folders , here is an example of a url http://www.orlandoescape.com/ezines/starwood/tickets/discount-disney-tickets.htm

this url we do not have but google is showing it as a error

Please help me to fix this.

Thanks

User avatar
Member
Member
Luke - 11/7/2011 6:47:21 AM
   
RE:Path Expression to ignore subfolders
Hi Sunil,

Google Webmaster Tools is usually behind in terms of crawl errors etc, I can see your sitemap does not reference the page you mention but it may have done previously? The quickest way I have found to prompt Google to update errors is to put a 301 moved permanently on the missing page url pointing to the correct one, i assume (/tickets/discount-disney-world-tickets.htm).

Alternatively you can request url removal through webmaster tools if it is causing you a problem?

Also, check all links on your pages to ensure you are not linking to the missing document anywhere?

Hope that helps a little?

User avatar
Member
Member
sunil-orlandoescape - 11/7/2011 8:49:40 AM
   
RE:Path Expression to ignore subfolders
Luke thanks for taking time to response to my query. Are you local in the US , can you email me at sunil@orlandoescape.com and we can discuss this further. I am willing to pay for your service.

Thanks and greatly appreciate your time.

Sunil