Intra-site Module Public Page Group
Hi
I've am trying out building custom modules with sitefinity 4.1 sp2. I followed the video by Josh Morales on creating an intra-site page based module. I have couple of questions:
1. Is there a way to create a page group for public pages. Meaning, there is one landing public page and other pages are a part of the group. I realize that we can create separate public pages but the reason I would prefer to have other pages in a group is that I do not want the users to navigate directly to a public page. I believe that page groups can be created in admin section.
2. Page Navigation Url: I found that we can get the current PageSiteNode's Url using ResolveUrl(Telerik.Sitefinity.Web.SiteMapBase.GetActualCurrentNode().Url). Is there a way to get some other page's Url the same way?
Thanks
Pratik
Hi Pratik,
1. You can create page groups fro the backend of frontend and there is no difference between both the types except that one will be used only on the frontend and another on the backend. Programmatically you can use
CreatePage(PageLocation pageLocation, Guid pageId, NodeType nodeType) method of the PageManager or fluent API - App.WorkWith.Page()
2. You can use PageNode and its Urls property.
Regards,
Ivan Dimitrov
the Telerik team
Hi Ivan
thanks for your quick response. I will try the CreatePage option soon for point 1. For point 2, I found something like this
var fluent = App.WorkWith().Pages();
//get a page by its Title
var mypage = fluent.LocatedIn(Telerik.Sitefinity.Fluent.Pages.PageLocation.Frontend).Where(
pg => pg.Page.Title == "Products").Get().FirstOrDefault();
ResolveUrl(mypage.GetFullUrl());
Hello Pratik,
This is the same, the difference is that you use the fluent API which calls the standard in its basis.
Greetings,
Ivan Dimitrov
the Telerik team