Comments (4)
@muhfred sorry for the late response, don't know how we missed this notification!
- please add the next code in assets/js/material-dashboard.js
$(function(){
var url = window.location.pathname;
var activePage = url.substring(url.lastIndexOf('/')+1);
$('div.sidebar-wrapper ul.nav li a').each(function(){
var currentPage = this.href.substring(this.href.lastIndexOf('/')+1);
if (activePage == currentPage) {
$(this).parent().addClass('active');
}
});
$('div.sidebar-wrapper ul .collapse ul li a').each(function(){
var currentPage = this.href.substring(this.href.lastIndexOf('/')+1);
if (activePage == currentPage) {
$(this).parent().parent().parent().addClass('in');
}
});
})
-
I think this will help you: https://bytes.com/topic/asp-net/answers/300117-how-change-pages-title-dynamically you need and ID of that div where is the title, and you change that from your controller. Unfortunately, we don't know how ASP.net is working so we cannot give you an exact answer.
-
That's great.
Best,
Alex
from ct-material-dashboard-pro.
all issues have been resolved, Than you.
from ct-material-dashboard-pro.
@muhfred thank you for using our product. I will answer for each item:
-
Are you using the class "sidebar-mini"? Or how do you want to have it open? Can you please share a link with us? Are you talking about the collapse elements and their children? Like the Buttons page from Components? If you want that to be activated we recommend you to either use the classes "in" and verify using the ASP.NET the current route and apply that class to the parent of the element like Buttons, or to implement a javascript like in this example: https://github.com/timcreative/light-bootstrap-dashboard-pro/issues/12 which is checking the URL and is applying the class to the collapse element.
-
I understand, but I cannot see which is the problem? Do you have variables in Razor? So you can have something like
<a class="navbar-brand" href="#/dashboard"> $variable_name </a>
? -
We've built the product using Material Bootstrap Design and they recommend to use Arrive JS library for dynamical elements.
Please let us know your status.
Best,
Alex
from ct-material-dashboard-pro.
- The issue that you referred to is the same which I'm facing, to keep the menu open and active when navigation from page to page, so where exactly I should apply this javaScript.
- no I don't have variables, I have the layout that contains the header(minimize navbar, search, notifications) the navbar on the right, and the body is applied on different pages, I want to display the title of the page on each on next to the minimize navbar button. How can I achieve when everything common is in the layout, and I want to display different title on every page.
- I got this on figured out thanks.
from ct-material-dashboard-pro.
Related Issues (20)
- Nav pills dark version HOT 2
- [Feature Request] Nav pills dark version
- Issue with nav pills inside modal HOT 1
- [Bug] Issue with nav pills inside modal HOT 2
- [Bug] Text label overlapping in form-input
- [Bug] Accordion + icon 'jumps' on collapse HOT 1
- datalabels not show up on chartjs pie chart HOT 3
- [Bug] Value of text input overlap with its label INSIDE MODAL
- [Bug] (Update Request) Simple-Datatable last version incompatible with CSS HOT 1
- [BUG] HOT 1
- [Bug] label overlaying text on reload HOT 1
- Selectpicker.js doesn't display the correct record in the list HOT 1
- [Feature Request] simple datatable HOT 2
- [Bug] Use material icon offline
- [Feature Request] Add validation in multi step form HOT 1
- SimpleDatatables not works with Ajax HOT 1
- [Bug] DataTables not works with Ajax
- [Bug] Trying to import your template into my project fails HOT 3
- unable to change size of modal in material dashboard pro version HOT 1
- [Bug] unable to change size of dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ct-material-dashboard-pro.