Giter VIP home page Giter VIP logo

Comments (4)

alexandru-paduraru avatar alexandru-paduraru commented on June 11, 2024 4

@muhfred sorry for the late response, don't know how we missed this notification!

  1. 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');
        }
    });
})
  1. 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.

  2. That's great.

Best,
Alex

from ct-material-dashboard-pro.

muhfred avatar muhfred commented on June 11, 2024 1

all issues have been resolved, Than you.

from ct-material-dashboard-pro.

alexandru-paduraru avatar alexandru-paduraru commented on June 11, 2024

@muhfred thank you for using our product. I will answer for each item:

  1. 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.

  2. 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>?

  3. 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.

muhfred avatar muhfred commented on June 11, 2024
  1. 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.
  2. 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.
  3. I got this on figured out thanks.

from ct-material-dashboard-pro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.