Giter Club home page Giter Club logo

Comments (3)

idlesign avatar idlesign commented on August 20, 2024

Hi,

It seems that the effect could be achived by using the second option and playing around with custom templates.

Something similar to 'item.is_in_active_branch' feature is planned. Can say nothing about 'current-active-branch-2nd-level-from-top' for now, except that such-long-identifiers make me feel uneasy %)

from django-sitetree.

marltu avatar marltu commented on August 20, 2024

Could you elaborate on how i would do this by using this-*

from django-sitetree.

idlesign avatar idlesign commented on August 20, 2024

Sorry for the delay.

I think you can try something like the following way:

  1. Override template for main menu;
  2. In overriden template find current branch item (I've just made a commit introducing 'in_current_branch' item property);
  3. Copy found item into some variable of the main document context (e.g.: variable 'my_current_root');
  4. Use that variable in 'sitetree_menu' tag instead of hard-coded alias.

Moreover in your templates you can play around with 'depth' items property.

from django-sitetree.

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.