Keep Navigation Links at one section and render it in all other pages - asp.net-mvc-4

I have 100 web pages to my web site.
All web pages has links to other 99 pages.
If i want to add one more page to my web site i have to add new page link to all other page. I want to keep all page link at one place.
So that i can render all Navigation links from that section.
How can i archive this in MVC 4?
My Number of pages are growing day by day.

I am not sure if I got the question right, but will the use of MasterPages help you out here?
http://msdn.microsoft.com/en-us/library/aa581781.aspx

this this and this must help you
Keeping all the links in _Layout.cshtml and calling the _Layout.cshtml in all pages is the solution.
To call the _Layout.cshtml in other pages use.
#{
Layout = "~/Views/Shared/_Layout.cshtml";
}

Related

How to find DotNetNuke pages that point to my dnn page

I have updated an existing user DNN page with some text. I can preview this page using the Page Management page. Since I didn't create this page I don't know which other pages/menus contain a link to this page. How can I find out which pages/menus link to this page?
Thanks
Who or what created the page?
What is the URL that you visit to edit the page? (Edit the URL here to use a phony name.)
Getting the exact number of links to a page is almost impossible without the use of a site crawler, as the page could be referenced in many ways.
Via HTML Content on a Page - This would be in the HTMLText table of the database
Via a Page-Link Menu Item - This would be in the Tabs table of the database
Via a URL-Link Menu Item - This would be in the Tabs table as well, just tied by the URL rather than the TabId
There is no report/link in the DNN Platform to list all usages.

Sitefinity widgets not showing on News Detail page

Inherited a Sitefinity website. There's a news list page, which I discovered is reused by the news detail pages to display content. If I update the list page, the changes are reflected on the detail pages.
Sometimes.
I have a content block that contains a "header" text - updating this in the list page is replicated across the details pages. Adding a javascript widget to the page to inject some custom javascript replicates across the details pages as well.
Adding a new content block or css widget does not replicate across the details pages.
Is there some rhyme or reason to this behavior that I'm missing?
My specifics:
I've successfully created widgets in the MVC several times now. I essentially need to add a new widget to just the news pages. Which seemed simple enough until I discovered that news pages are not individually created pages like... well, pages... but instead are just a content piece that is dynamically inserted in the news widget on the "parent" listing page. At least as far as I can tell that's how it appears to be working.
Adding my widget to the page didn't work, as I explained above. I then tried recreating it in the page itself using javascript, content block, and css widgets, at which time I discovered that the javascript is the only one making it to the details pages. I imagine this has to do with the way javascript widgets actually make it to the page - their placement is selected in advanced options, rather than simply appearing inline.
Sitefinity widgets go beyond presentation, and actually control routing.
As such content widgets (baseline or custom) have two 'modes' that they operate in: list and detail. Slugs for details are automatically generated in the following format.
/News
/News/{News-item-slug}
Of course, a list and a detail should look very different. To accommodate that, the widgets have two separate configurable templates.
So, add your custom html and javascript to the appropriate template to have it only apply in a given mode.

link to another controller with hot towel and durandal

I am developing an mvc4 app with multiple spa's.
I am using the hot towel template for my spa.
What I want to do is have a anchor link within my views for a spa go to the index action for another controller, so my users can exit one spa and open another. Not all actions will start a spa some are regular mvc style pages.
I have put code like like the following in my spa html pages:
Navigate to another controller
This will change the url in the browser but always reloads the default html page for the spa. If I hit the refresh button in the browser then if will go to the proper page.
I have been able to put a target on the anchor tag of _parent or _top like:
Navigate to another controller
and it will navigate to the new controller page.
I believe it is something in the durandal framework that is preventing the spa from navigating to the second controller, but since I am just starting to work with this, I am stumped as what I need to change. I think there should be a better way than using the target in the anchor tag, or is that the best option.
I hope that I have understood you correctly. I believe this behaviour is caused my Sammy.js (which the durandal router is currently based on). The default behaviour of Sammy is to hijack all links and process them as regards to the SPA itself.
I didn't like this behaviour for the website I am working on and needed links to other MVC web pages to be possible from within the SPA. What I really wanted is for regular links to just work and hash links to be interpreted as a link to another view within the SPA. So '/controller/action' would go to another web page and '#moduleId' would go to another durandal V/VM.
I found this Sammy option that works for me and set it in my main.js
// This stops Sammy from hijacking regular links
Sammy.Application.prototype.disable_push_state = true;

How to change global navigation of a web page but not the site in SharePoint 2010?

I created a web page with a custom page layout, the site the page is within has global navigation set to "Display the same navigation items as the parent site" and it was all good. I have now got the requirement to change the items in the global navigation for the page but keep the old setting for the site, how can I achieve this?
For a site I can go to site settings -> navigation and change the links as I like but the page is dependent on the site it is within. I don't have to start over and create a new site do I (instead of a simple page)?
Thanks in advance.
Unless you do some kind of trickery (like Javascript embedded in the page) to do otherwise, the navigation settings are shared for all pages within the site.
If you wanted to get rid of global navigation for a particular page, you could customize your master page to put a special CSS class on the element wrapping it, and use some CSS inline on that page (ie. in a content editor webpart) to hide it.

Welcomepage is missing from Quicklauch

I'm using a publishing web. I have two pages. The navigation is set to show pages.
It shows two menu items, for each page one item.
The problem:
When setting publishing page 1 as the welcomepage, this page is removed from the quicklaunch navigation.
Probable cause:
The PortalSitemap providers filters the welcomepages from quicklaunch. Probably because the web has the same url as the welcomepage?
Any thoughts about this and how to fix this by configuring the provider?
At this moment I added a (external) node...
Try to add page to navigation directly.
Site Settings => Navigation
you can use a little trick.
This happens because sharepoint removes the welcome page from the quicklaunch. But if you set the welcomepage with a different URL its appears.
for Ex: if you want the page "XPTO.aspx" to be your welcomepage, set it as "XPTO.aspx?".
this way the page will be set as welcomepage, and it will appear on quick launch .
this happens beacul sharepoint thinks that "xpto.aspx" and "xpto.aspx?" ate 2 different pages, but they are not.