|
 |
|
|
Hi!
Thanks for the nice nav control!
Any idea why the CurrentNodeParentCssClass parameter does not display the css class specified? Here is my control:
<QuestechPublishingWebControls:VerticalNavigation SiteMapProvider="CombinedNavSiteMapProvider" CompactMode="True" ListCssClass="navi1" IncludePages="False" CurrentNodeParentCssClass="current" CurrentNodeCssClass="selected" runat="server" />
What I'd need is something like this:
<ul class="nav1"> <li><a href="#">Page1</a></li> <li class="current"><span class="selected">Page2</span></li> <li><a href="#">Page3</a></li> </ul>
However, this current node is rendered as:
<li><span class="selected">Page2</span></li>
...without the class specification on the <li>
Been working great otherwise!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
CurrentNodeParentCssClass is for the parent node of the selected/current node so it is rendering correctly by design.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Ok, so by CurrentNode, you mean the <li> element, not the <span> element? Would the CurrentNodeParentCssClass only apply to a nested lists parent <li>?
modified on Wednesday, August 27, 2008 3:37 PM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
A node is a site in the hierarchy tree. When a CSS class is applied to a node, it means the name is wrapped either by something like <span class=".."></span> or <a href="" class=""></a>. In the example provided in the description, if current node is Child211, the parent node is Child21. Hope this helps.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Hi there Thanks for the great project.
If I place more than one instance of this control on a page I get errors in my LOG file like:
Potentially excessive number of SPRequest objects (9) currently unreleased on thread 7. Ensure that this object or its parent (such as an SPWeb or SPSite) is being properly disposed. Allocation Id for this object: {8181273E-8BF9-496B-9B02-5EF4B081BEFB} Stack trace of current allocation: at Microsoft.SharePoint.SPRequestManager.Add(SPRequest request, Boolean shareable) at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) at Microsoft.SharePoint.SPWeb.InitializeSPRequest() at Microsoft.SharePoint.SPWeb.EnsureSPRequest() at Microsoft.SharePoint.SPWeb.get_Request() at Microsoft.SharePoint.SPWeb.InitWebPubl... ...ic() at Microsoft.SharePoint.SPWeb.get_ServerRelativeUrl() at Microsoft.SharePoint.Publishing.CachedArea.GetAreaId(SPWeb web) at Microsoft.SharePoint.Publishing.CachedArea.CreateCachedArea(PublishingWeb area, CachedObjectFactory factory, String parentId) at Microsoft.SharePoint.Publishing.CachedObjectFactory.CreateWebFromUrl(String url) at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.FindSiteMapNode(String rawUrl, SPWeb currentContext) at Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.FindSiteMapNode(String rawUrl) at System.Web.SiteMapProvider.FindSiteMapNodeFromKey(String key) at QuestechSystems.SharePoint.Publishing.WebControls.VerticalNavigation.GetStartingNode() at QuestechSystems.SharePoint.Publishing.WebContro... ...ls.VerticalNavigation.CreateChildControls()
Is there a way to modify the control so that it does not encounter these problems? Thanks!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
I stepped through the code, and it throws the exception in the ShowNode function when trying to execute this statement: if (parentNode.Key == _provider.CurrentNode.Key || (parentNode.Key == _provider.CurrentNode.ParentNode.Key && !IsNodeExpandable(_provider.CurrentNode, level)) || _provider.CurrentNode.IsDescendantOf(parentNode)) { return true; }
I noticed that _provider.CurrentNode.ParentNode.Key is null. Can you please tell me how to fix this? Thanks!
modified on Thursday, May 1, 2008 7:54 PM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Are you running the latest V1.2? In the latest version, above the if statement,
SiteMapNode parentNode = node.ParentNode; if (parentNode == null || _provider.CurrentNode.ParentNode == null) { return false; }
So _provider.CurrentNode.ParentNode is already checked for null there, so you should not be getting the exception ...
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi Stephen
I like your menu and it's very easy to implement.
I got a question, how can I exclude certain types of menu?
For instant, in the Moss when you create a sub-site, it has default link attached to it such as link, document, people, etc...
I just want the menu to show the sub-site but not the default links under the sub-site.
instead of this
Home Sub1 Sub2 Link [default] Document [default] People [default] Discussion [default] Custom Page Sub3
Can it be
Home Sub1 Sub2 Custom Page Sub3
Thank you in advance for helping me.
Cheers LM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
hi
I have actually fixed it by adding this line in the code
private void InitPortalSiteMapProvider(SiteMapProvider siteMapProvider) { ... ... _provider.IncludeHeadings = false; }
Is it a way that I can add this in tag as shown below...instead of hardcoded in the code
<questechpublishingwebcontrols:verticalnavigation trimnoncurrenttypes="Heading" TreatStartingNodeAsCurrent="true" CompactMode="False" runat="server"/>
thanks LM
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Anybody please help !!!!
In a sharepoint site when the default search button in the right side is clicked it is redirecting to search.aspx.How can I alter that and redirect it to a desired location Thanks in Advance Rahul
Let noble thoughts come to us from every side-Rig Veda
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Hi,
Thanks for providing the source code. I have installed it, however, I received the following error message when I try adding the custom control into the masterpage: "The proivder 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection." Can anyone please help me?
Cheers
Felicia
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I have the same problem! In general, a little bit more guidance on how to get these things in place would be nice.. Don't get me wrong, I love the initiative and I am glad for having access to the source code.
/HW
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
How can the values in lookupfield in a SPList can be filtered programmatically?
Let noble thoughts come to us from every side-Rig Veda
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Hello,
I analyzed your code, and I have one question: For example, how to modify code so that it shows all nodes on parent node level like this:
* News * Press Releases o 2006 + December + November + October o 2005 o 2004
Dragan Panjkov
http://panjkov.qsh.eu/ http://blogpanjkov.qsh.eu/
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
In function IsNodeInPath, change
if (parentNode != null && parentNode.Key == _currentNodeKey) { return true; }
to
if (parentNode != null) { if (parentNode.Key == _currentNodeKey || parentNode.Key == _provider.CurrentNode.ParentNode.Key) { return true; } }
and see if it helps.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
Thanks, Stephen...
Could I call this test recursively on all parent nodes from botton to top. I now have this solved on first parent level with code you provided, but I need something similar to this:
if (parentNode != null) { if (parentNode.Key == _currentNodeKey || parentNode.Key == _provider.CurrentNode.ParentNode.Key) { return true; } PERFORM SIMILAR TEST ON parentNode.Parent...
}
i tried :
SiteMapNode parentNodeUpper = parentNode.ParentNode; //if (parentNode != null && parentNode.Key == _currentNodeKey) //{ // return true; //} if (parentNodeUpper != null) { if (parentNodeUpper.Key == _currentNodeKey || parentNodeUpper.Key == _provider.CurrentNode.ParentNode.ParentNode.Key) { return true; } }
Something similar to sitemap, but only on part of the tree
Dragan Panjkov http://panjkov.qsh.eu/ http://blogpanjkov.qsh.eu/
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
I tried to modify RenderNode function, but without result. I manage to reproduce all nodes on parent node level, but then I have repeated nodes on root level and repeated list on current node's level: Here is a code. It's NOT WORKING !!! THIS CODE IS NOT VALID !!!
//Added Loop and collection //SiteMapNodeCollection nodes2 = _provider.GetChildNodes(node.ParentNode); // foreach (SiteMapNode nodevar in nodes2) // { // Controls.Add(new LiteralControl(ListItemOpenHtml)); // if (nodevar.ParentNode == node.ParentNode) // { // RenderNodeItem(nodevar, level); // } // if (nodevar == node) // { // if (IsNodeExpandable(node, level)) // { // Controls.Add(new LiteralControl(ListOpenHtml));
// SiteMapNodeCollection nodes = _provider.GetChildNodes(node);
// foreach (SiteMapNode childrenNode in nodes) // { // RenderNode(childrenNode, level + 1); // }
// Controls.Add(new LiteralControl(ListCloseHtml)); // } // }
// Controls.Add(new LiteralControl(ListItemCloseHtml)); // } //// Loop Ends
Dragan Panjkov http://panjkov.qsh.eu/ http://blogpanjkov.qsh.eu/
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
In the new version 1.1 of the code, modify the following inside function ShowNode:
Change
if (parentNode.Key == _provider.CurrentNode.Key || (parentNode.Key == _provider.CurrentNode.ParentNode.Key && !IsNodeExpandable(_provider.CurrentNode, level)))
to
if (parentNode.Key == _provider.CurrentNode.Key || (parentNode.Key == _provider.CurrentNode.ParentNode.Key && !IsNodeExpandable(_provider.CurrentNode, level)) || _provider.CurrentNode.IsDescendantOf(parentNode))
and see if it works for you.
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
I did this, and I show the nodes successfully for all the subsites. At my root site, it shows the main site name and it says: "Object reference not set to an instance of an object." did anyone run into this error?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |