Purpose of an EpiServer MenuList's page link? - c#

Cannot seem to grasp the concept of PageLink attributes for EpiServer listing controls. I need to understand this: "PageLink: Provides a page reference to a page; the children of that page will become the collection used." Supposing I'd like to use a MenuList - what sort of 'children' will be/can be used as a datasource to a menu control?

According to the EPiServer documentation
As PageLink is guaranteed to be unique among all pages in a certain
EPiServer instances, it is used in the following example to create
unique IDs and names for HTML check boxes. The code is used to present
the visitor with a selection of pages and allows them to select one or
more for further processing.
My understanding is that if you set a PageLink in your listing control, it will have access to the child pages based on that page.

Related

How can I build a link to navigate to the parent page inside of a 2sxc app using c# razor templates?

I'm building an app that lists out careers in a listing and also has a details template.
The pages in DNN are structured like this: Students (parent) > Organize (child)
I want to make a simple link in the details template (c# razor) to point back to the parent of this child page. So when I'm on Organize, make the link point back to "Students"
Looking through the 2sxc template editor, I see that I can get the parent page's ID using: #Dnn.Tab.ParentId but I'm not sure how to construct a link using that ID.
But how can I make a link to the parent page?
One simple thing you can always do is just href="/tabid/nnn" - so
Up
Based on your description, I am not sure that covers you 100% of the time, but seemed worth pointing out. :)
If you prefer a more "code" approach, use 2sxc's Link.To()...
Up
Reference

Xamarin Forms: How to do multiple pages within multiple pages (nested)?

I've been searching for an answer to this for months. I have an app that will go from a login page (mainpage) to a 6-button menu page (menupage). Each of the 6 items on the menu page will then go to a 3 or 4 menu item page of it's own. I know that you are only supposed to put content pages as children of a navigation page, so I think that's out as a possible solution for the initial menupage. Can you nest tabbed pages (although that style is not what I'm looking for)?
All of the examples I've found online seem to address only one main page and a sub-page kind of hierarchy (parent - child). I'm looking for something that will support 3 levels and maybe even more (parent - child - grandchild, etc.).
Am I over-complicating this? Any advice on this would be welcomed.
I would recommend keeping your login page and your menu page in separate "stacks" i.e. change App.Current.MainPage when you swap between them.
As for the hierarchy, I can't see an issue. When you show menupage put it in a navigation page then just push the sub pages. You can have as many levels as you want.
If i understand you question correctly you could just use a master-detail page with 6 items, each of items being a tabbed page with sub-pages.
If the question was "how to include sub-pages into a page using a custom method", then take a look at: https://github.com/twintechs/TwinTechsFormsLib when you build the sample they have a custom page container for nesting pages insidem the only limitation is child pages can't be navigation ones.

Use one control multiple times in ASP.NET

What I have is few dropDownLists in few different templates of FormView.
And of course I can't get access to any of those.
What I want to do is get the same behavior for every DropdownList.
Is there any way to declare that DropDownList globally and reuse it or it should be done somehow with FindControl?
User control declarative syntax is very similar to syntax used to create an ASP.NET Web page.
The primary differences are that the user controls use an # Control directive in place of an # Page directive, and that the user controls do not include the html, body, and form elements around the content.
MSDN/creating usercontrol

Should I use a ListView for single-row data?

I use Asp.net 4 and C#.
I'm developing a simple CMS, at the moment I want to displays the content for a specific PAGE (Title, BodyContent, and some other fields) at the end user on a web page (like as this website display its questions to its Users).
I need wrap my fields from database in appropriate HTML TAGS example <h1>Title</h1> <div>BodyContent</div>.
The resulting page should be READ ONLY .
I would like to know:
If a ListView web control with setting for a single row would be the
right choice (maybe binded with ObjectDataSource).
If would be better use separate Web Controls like Literals or
Labels to displays my fields sparsely on my webpage
In case of previous point how would I DataBind every single Control? Using different DataBinder or maybe with Linq an projecting using Anonymous Type.
I'm mainly concerned with read-only performance.
If you have data that's a single row, there's not much point in using a ListView. They're designed for showing lists of data (hence the name). If you have one item, consider either a DetailsView or single Labels.
If you have a particular class that often needs to be displayed in a certain way, consider setting up a Web User Control that can be bound to instances of that class.

Accessing custom property of lists of site definition in default.aspx page

I am working on Sharepoint. I am creating a site definition that is having a list using that I am insert so many properties inside the list. I am done with the creation part. Now I have to display the properties of the list in default.aspx page of Site definition. I have defined the properties of the list inside the schema.xml file in List Definition.
I have used ProjectProperty, ListProperty, ListItemProperty and even FieldValue. But I am not able to fetch that property values.
Please suggest me how to go with this.
Any help is appreciated.
I found some wired answers for this on net. They say that default.aspx page of site definition is not of Field Type so we can't access custom property in this page directly. So what I did is I created a XsltListViewWebPart using a XSLT and using that I am able to fetch the custom fields of my list.
Hope this will work for others as well.

Categories

Resources