Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Menu web part View modes: 
User avatar
Member
Member
pavel.1991-tut - 3/27/2013 3:58:02 AM
   
Menu web part
I'm using the web-part cmslistmenu. My site has five sections(news, articles, about us, etc.). There are pages in these sections, for example, news1, news2, news3; article1, article2, article3. What should I do that my menu be like this:
- article1 - news3 - article4 - news5

I mean that the pages article1, news3, article4 and news5 are situated in the different sections and these pages from different sections must be in the first level of the my menu. In web part configs I can choose only the section from which subpages will be shown in menu.

User avatar
Member
Member
pavel.1991-tut - 3/27/2013 4:06:53 AM
   
RE:Menu web part
And I have one more question. My pages have url aliases. For example, there is a page with url "/articles/article1.aspx", this page has url allias "article1". What should I do that there be aliases in menu? Now menu web-part generate link in menu with url "/articles/article1.aspx", but I need url "article1".

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/27/2013 8:01:33 AM
   
RE:Menu web part
pavel.1991-tut wrote: And I have one more question. My pages have url aliases. For example, there is a page with url "/articles/article1.aspx", this page has url allias "article1". What should I do that there be aliases in menu? Now menu web-part generate link in menu with url "/articles/article1.aspx", but I need url "article1".

Not sure I'm understanding you. Are you putting an alias in the Articles page properties for each article (article1.aspx, article2.aspx, etc) that you add? If so, this is not needed, the URL's will automatically be generated based on where the document is placed.

User avatar
Member
Member
pavel.1991-tut - 3/27/2013 4:17:42 AM
   
RE:Menu web part
And one more question. This web-part generates html code. I need that there be another html code. Where can I change this html code? When I choose web part layout and choose "new", I see this
<%@ Control Language="C#" AutoEventWireup="true"
Inherits="CMSWebParts_Navigation_cmslistmenu" CodeFile="~/CMSWebParts/Navigation/cmslistmenu.ascx.cs" %>
<cms:CMSListMenu ID="menuElem" runat="server" />

but where are the html which will be generated after web part fininsh its work?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/27/2013 8:41:06 AM
   
RE:Menu web part
pavel.1991-tut wrote: And one more question. This web-part generates html code. I need that there be another html code. Where can I change this html code? When I choose web part layout and choose "new", I see this
<%@ Control Language="C#" AutoEventWireup="true"
Inherits="CMSWebParts_Navigation_cmslistmenu" CodeFile="~/CMSWebParts/Navigation/cmslistmenu.ascx.cs" %>
<cms:CMSListMenu ID="menuElem" runat="server" />

but where are the html which will be generated after web part fininsh its work?

What HTML are you attempting to modify? Or what would be your desired output? You can always use a repeater to create your navigation if you don't want to use the built in control. Take a look here for an example specifically the post from kentico_janh on 7/27/2012 1:56:06 AM.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/27/2013 7:59:02 AM
   
RE:Menu web part
pavel.1991-tut wrote: I'm using the web-part cmslistmenu. My site has five sections(news, articles, about us, etc.). There are pages in these sections, for example, news1, news2, news3; article1, article2, article3. What should I do that my menu be like this:
- article1 - news3 - article4 - news5

I mean that the pages article1, news3, article4 and news5 are situated in the different sections and these pages from different sections must be in the first level of the my menu. In web part configs I can choose only the section from which subpages will be shown in menu.
I suggest installing one of the sample sites and learn a bit more about Kentico before going in head first.

In regards to where your documents are and how to display them. For your main navigation, this webpart should be on your master page on the root of your site. From there you set the path to /% which will take everything and if you only want to show "Page" document types select cms.menuitem in the Document type. If you want to display pages, articles, news items, etc. then select those document types as well and they will display in your menu. Be wary though of showing too many of those items in your menu as the more you display, the more problems you might have with your design and layout.

User avatar
Member
Member
pavel.1991-tut - 3/27/2013 8:25:53 AM
   
RE:Menu web part
Can you tell me where I can get a sample site to import it to my cms?


In regards to menu. I understand about document types, but I need another thing. I have 2 sections. News and articles(both sections have document type "page menu item"). In each sections there are pages, for example, news1 in news section and article1 in articles section. I want that there be pages "news1" and "article1" in first level of my menu. My menu must look like this:
-- news1 -- -- article1 --

Just two these menu items without subitems!

User avatar
Kentico Consulting
Kentico Consulting
richards@kentico.com - 4/5/2013 11:58:00 PM
   
RE:Menu web part
Hi,

If I understand you correctly you are trying to display the document types in the menu, is that correct? If this would be the case you may need to enable "Show in navigation" for that document in the Properties -> Menu tab
See more details at
http://devnet.kentico.com/docs/devguide/document_properties_menu.htm

You may be also interested in the setting for the document types (Site manager -> Development-> Document types - edit some type - General tab)

Behaves as Page (menu item) type

Indicates if the document type has similar behavior as Page (menu item) document type. The default view mode for such a document type is the Page tab. Viewer web parts are automatically set to display the child documents if the path is not configured and the document does not inherit its parent template by default.

Also you may check out our sample site if you go Site manager -> Sites -> New Site Wizard. This will create a new site (it will not replace your site and can be deleted any time) in a few moments. There are many examples of any webpart so it is worth checking out.

Kind regards,
Richard Sustek