Coder Social home page Coder Social logo

Comments (7)

vytsci avatar vytsci commented on June 6, 2024

File:
frontend/core/engine/navigation.php

Code:
public static function addSelectedPageIds($selected = array())
{
// set manual selection
if(is_array($selected))
self::$selectedPageIds = array_merge(self::$selectedPageIds, $selected);
else
self::$selectedPageIds[] = $selected;
}

Usage:
FrontendNavigation::addSelectedPageIds(array('XXX', 'XXX'));

Maybe this is not proper solution, but adding selected pages manually should be a great feature.

from forkcms.

tijsverkoyen avatar tijsverkoyen commented on June 6, 2024

Can you provide us with an example. Because the navigation should detect selected element by default.

from forkcms.

vytsci avatar vytsci commented on June 6, 2024

Words Internal Links should say everything, dunno how to explain more clearly because. Simple pages will be selected as expected, but internal links will not be selected. There should be some feature to override or add more selections to navigation, now there is no simple way to select internal links on fork navigation.

from forkcms.

tijsverkoyen avatar tijsverkoyen commented on June 6, 2024

Can you create some screenshots and pinpoint the problem, because I really don't understand.

from forkcms.

vytsci avatar vytsci commented on June 6, 2024

I will try to explain more clearly.
I have my navigation:
Home
-Sales users (empty)
--Sales users subpage (type: page)
--Sales users subpage2 (type: page)
--Analysis (type: internal link)

Single pages
-Analysis

And if i go to Sales users -> Analysis i needed to mark that in my navigation as selected when i enter Single pages -> Analysis, because analysis is hidden, they see only Sales users -> Analysis. Problem is why i just cant add that module to my sales users is that i have more than just sales users using same structure and same analysis module with only data difference. And if i use internal links my navigation items with internal links will never be highlighted and i didnt find any way to add more highlights to my navigation.

from forkcms.

dieterve avatar dieterve commented on June 6, 2024

This is an edge case and will not be applicable in most cases. Will not be implemented..

from forkcms.

vytsci avatar vytsci commented on June 6, 2024

That is very sad, because i cant choose fork for more custom projects, only for standard ones? is it so hard to create good api that everyone can use without core modifications? How would you implement updates while everyone will have to modify core for such small things, like main layout change or navigation selected items handling? Almost every problem can be solved without modifying core except for couple of little problems like these two and thats not going to be implemented. :) ok thanks for reply. Bye.

from forkcms.

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.