wintercms / wn-pages-plugin

Static Pages plugin for Winter CMS
https://wintercms.com/
MIT License
9 stars 22 forks source link

isActive marker for / url #27

Closed damsfx closed 3 weeks ago

damsfx commented 1 year ago

Description:

A page with / url is not marked as active (isActive = false) when visiting website home page.

Steps To Reproduce:

Add some statics pages, one having / has URL.

..\meta\static-pages.yaml file :

static-pages:
    index: {  }
    page2: {  }
    page3: {  }

...\content\static-pages\index.htm file :

[viewBag]
title = "Home
url = "/"
layout = "default"
is_hidden = 0
navigation_hidden = 0
==
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam, impedit.

Setting a menu :

name: 'Top - Navbar'
items:
    -
        title: main
        nesting: null
        type: all-static-pages
        url: null
        code: ''
        reference: null
        cmsPage: null
        replace: 1
        viewBag:
            isHidden: '0'
            cssClass: ''
            isExternal: '0'

Visiting http://acme.tld doesn't mark the menu item as active, while visiting http://acme.tld/ does.
I am missing something ?

bennothommo commented 1 year ago

I've spotted this before, so can confirm. I generally don't include the home page in the navigation (usually, I just make the logo link to the home page, and the logo doesn't have an active state). But it's something we'll need to look at.

LukeTowers commented 3 weeks ago

Is this still an issue @damsfx?

damsfx commented 3 weeks ago

Is this still an issue @damsfx?

Apparently not ... I'll try to test it on more projects. Until then, I think it's possible to close the issue