Problem/Motivation

if I insert a url containing a final *, I expect that the pages starting with that url have changed the "body". This does not happen.
Example, url = "/ example-views *"
I propose modification by adding a condition similar to this below in the page_specific_class.module line 36.
Sorry for the imperfect English. thank you

        // If current path contain *
        if (substr ( $enteredPath , strlen($enteredPath)-1, 1) == '*') {
             if(substr($current_path, 0, strlen($enteredPath)-1) == substr($enteredPath, 0, strlen($enteredPath)-1)){
              foreach ($classes_array as $class) {
                $variables['attributes']['class'][] = Html::cleanCssIdentifier($class, []);
              }
            }
        }

Comments

giannigiusti created an issue. See original summary.

hardik_patel_12’s picture

Hi @giannigiusti yesterday I have released a new "2.0.7" version of this module which has functionality for wild cards url's as well.
Can you please try with the new version of this module or with your current version try the patch written at #28 here:https://www.drupal.org/project/page_specific_class/issues/3184548#commen...

giannigiusti’s picture

Works well! thank you!

ivnish’s picture

Category: Feature request » Support request
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.