Comments (3)
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.
Could you elaborate on how i would do this by using this-*
from django-sitetree.
Sorry for the delay.
I think you can try something like the following way:
- Override template for main menu;
- In overriden template find current branch item (I've just made a commit introducing 'in_current_branch' item property);
- Copy found item into some variable of the main document context (e.g.: variable 'my_current_root');
- 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)
- Dynamic Trees - missing something? HOT 6
- Finer add permission check for displaying the "Add site tree Item" button HOT 3
- Incorporate one dynamic tree into another HOT 2
- How to pass the data models to a menu template ? HOT 4
- Menu Components only appear when the current page HOT 5
- Django 3.1 compatibility HOT 2
- Tests are missing from the sdist HOT 1
- Matching this when multiple URL matches fails HOT 2
- Tree items not displayed in menu if url contains certain special characters HOT 4
- Query the AppConfig directly for its module name HOT 4
- NoReverseMatch on custom models HOT 5
- SiteTree class not returning current item HOT 1
- Sitetreedump with "tree" arguments don't work correctly HOT 1
- compose_dynamic_tree with access_by_perms called in `config.ready` results in database errors HOT 3
- Allow HTML in title_resolved (to allow font-awesome icons) HOT 4
- When changing DEFAULT_AUTO_FIELD setting there are pending migrations
- Building and using a dynamic menu HOT 2
- Dynamic tree items: allow custom attribute binding in item() HOT 1
- Dynamic tree items: simplified access check
- Mapping nested entities to bread crumbs HOT 2
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 django-sitetree.