Coder Social home page Coder Social logo

Comments (3)

francodacosta avatar francodacosta commented on July 23, 2024

@bleutzinn can you change false to true on https://github.com/francodacosta/grav-plugin-page-stats/blob/master/page-stats.php#L209 and let me know if it works ?

Otherwise I have to look at it with more attention

from grav-plugin-page-stats.

bleutzinn avatar bleutzinn commented on July 23, 2024

It does fix the problem with links to pages but unfortunately all links to stats remain broken. That is all links with the fa-line-chart icon. For example the URL of the Top Users statistics details is http://localhost/grav/admin/page-stats/top-users but the link is http://localhost/admin/page-stats/top-users.

from grav-plugin-page-stats.

bleutzinn avatar bleutzinn commented on July 23, 2024

It appears that adding the theme variable home_url to the start of links adds the subdirectory in which Grav is installed.

For example in https://github.com/francodacosta/grav-plugin-page-stats/blob/master/themes/admin/templates/widgets/recently-viewed-pages.html.twig#L54 changing
href="{{ pageStats.urls.pageDetails}} to
href="{{ home_url }}{{ pageStats.urls.pageDetails}}.

The documentation) states that the home_url variable takes the currently active language into account. So I tested using an active language and it works okay.
I did not test with Grav being in the document root.

from grav-plugin-page-stats.

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.