Extranet Sitemap

Topics: Standard packages
Jul 19, 2011 at 12:44 AM

Just installing the Extranet Trial and it works wonderfully. It's very well thought out.

However, there is ONE question I have when it comes to sitemaps.

I would like to EXCLUDE protected pages from being seen in my sitemap when the user is not logged on.

I'm using the Extranet as a way to provide my Retailers with a different view of the site than the end customers (to download HI-Res images, etc.)

Using the Composite.Pages.SitemapXml shows all pages on the site, whether they're protected or not. Is there an easy way to do this?

As an example, if my site hierarchy is as follows:

  • Home
  • Products
    • Best Sellers
    • New Products
    • Retailer Product Page (PROTECTED)
  • About Us
  • News
    • Retailer News (PROTECTED)

I don't want Retailer Product Page and Retailer News to show up in my SitemapXml

Jul 19, 2011 at 9:20 AM
Edited Jul 19, 2011 at 9:36 AM

Try C1 function Composite.Community.Extranet.Navigation.ExtranetSitemapXml

I'm not sure if the result xml namespaces/attributes are 1-to-1, but it should have the same structure

Jul 20, 2011 at 11:44 PM

Thanks!

 

It maps 1:1... however, it doesn't have Source page and Page scope. I assume that Source Page is the currently rendered page and I'm going to do some testing on that but I was planning on using Page Scope to limit the Sitemap to one of my websites.

Is there more documentation on how best to use this? I'm not sure what the UserId and GroupId parameters actually do.

I've tried adding in one of the groups that I have set up as a parameter, but there seems to be no change in the output in the Preview Pane.

Jul 21, 2011 at 12:22 AM

True that you can not overload the 'source = current page' behaviour and that you get the entire sitemap. An easy way to test if the source page is the currently rendered page is to use the debug settings in the XSLT Editor. If the sitemap xml you get have "active page" annotations, you should be able to 'xpath filter' out other sites when rendering a sitemap.

The ExtranetSitemapXml C1 function is not documented so I have to get back to you on the specifics, but check the extranet api function GetExtranetSitemapXml - the two are somewhat related.

Jul 21, 2011 at 9:44 AM
Edited Jul 21, 2011 at 9:45 AM
atomiton wrote:

...I'm not sure what the UserId and GroupId parameters actually do.

I've tried adding in one of the groups that I have set up as a parameter, but there seems to be no change in the output in the Preview Pane.

Hi atomiton,

If you specify an existing Extranet Group ID in the GroupId parameter, the group's permissions on protected pages will be added to the current Extranet user, and he/she will be able to see the group-specific protected pages in the resulting sitemap. This would work even with the user who is not logged in.

The same is true for the UserId parameter: When you specify an existing Extranet User ID here, the permissions of the groups (this user is a member of) will be added to the current user. Again, it will work even if the user is not logged in.

The thing is that unfortunately in the current version of the Extranet package, the GroupId parameter is not working. The UserId parameter is working, though, so you can try and use it for now if needed.

This GroupId parameter issue will be fixed and the fix will be available in the next version of the Extranet package.

Sorry for inconveniences

/Vitaly

Jul 21, 2011 at 12:54 PM

Extended our documentation with some info on Composite.Community.Extranet.Navigation.ExtranetSitemapXml

Please see: ExtranetSitemapXml

 

Jul 22, 2011 at 5:29 AM

Excellent! Thanks!

Jul 23, 2011 at 12:14 AM
wysocki wrote:
atomiton wrote:

...I'm not sure what the UserId and GroupId parameters actually do.

I've tried adding in one of the groups that I have set up as a parameter, but there seems to be no change in the output in the Preview Pane.

Hi atomiton,

If you specify an existing Extranet Group ID in the GroupId parameter, the group's permissions on protected pages will be added to the current Extranet user, and he/she will be able to see the group-specific protected pages in the resulting sitemap. This would work even with the user who is not logged in.

The same is true for the UserId parameter: When you specify an existing Extranet User ID here, the permissions of the groups (this user is a member of) will be added to the current user. Again, it will work even if the user is not logged in.

The thing is that unfortunately in the current version of the Extranet package, the GroupId parameter is not working. The UserId parameter is working, though, so you can try and use it for now if needed.

This GroupId parameter issue will be fixed and the fix will be available in the next version of the Extranet package.

Sorry for inconveniences

/Vitaly

If I can make one observation as well.

When I am on a non-protected page that has protected content on it and logout, the URL changes to http://my.site.com/Renderers/Page.aspx?pageId={GUID}

So... example scenario:

  • http://my.site.com/products is public. 
  • The products page has GroupSpecificContent
    • LoginStatus Function is embedded inside the HTML of  GroupSpecificContent (on the Layout Page)
    • Special content is in GroupSpecificContent
  • So, ONLY when logged in, the LoginStatus function shows up on the page
  • Once you press Logout, the page refreshes but the URL in the bar changes
    • from http://my.site.com/products
    • to http://my.site.com/Renderers/Page.aspx?pageId={GUID}

This is running on 2.1.3. The content is fine and all the protected elements disappear, which is wonderful.

I noticed that this does NOT happen on Protected pages, because once you logout you're no longer authorized to be on that page, so it redirects you to the login page. However, when on public pages with protected content, this situation pops up. It's more of a minor annoyance than anything else... but I thought I'd let the geniuses at C1 know.

Jul 25, 2011 at 8:39 AM
atomiton wrote:

...

When I am on a non-protected page that has protected content on it and logout, the URL changes to http://my.site.com/Renderers/Page.aspx?pageId={GUID}

...


Thank you, atomiton.

The issue has been registered and will be fixed in the next versions of Extranet

/Vitaly