Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How i add <li> class #57

Closed
yerbol89 opened this issue Jun 1, 2016 · 9 comments
Closed

How i add <li> class #57

yerbol89 opened this issue Jun 1, 2016 · 9 comments

Comments

@yerbol89
Copy link

yerbol89 commented Jun 1, 2016

456
otbasyi-ba--yityi

@amiyasahu
Copy link
Owner

amiyasahu commented Jun 2, 2016

You can add it like this here -
https://github.com/amiyasahu/Donut/blob/master/qa-theme/Donut-theme/qa-donut-layer.php#L500

$this->content[ 'navigation' ][ 'main' ][ 'donut-theme' ] = array(
    'url'      => 'https://github.com/amiyasahu/Donut',
    'label'    => 'Donut theme',
    'selected' => 0,
);

You can change the label and URL as you wish. Also you can add links via q2a admin panel -> pages .

@yerbol89
Copy link
Author

@amiyasahu bro help me.
How i add li class?
Please tell me class css add php code.

1

@amiyasahu
Copy link
Owner

Just use the PHP code I have given in my previous comment.

@yerbol89
Copy link
Author

yerbol89 commented Oct 30, 2016

@amiyasahu Its true?

function body_header() // adds login bar, user navigation and search at top of page in place of custom header content
        {
            if ( !empty( $this->content['navigation']['main'] ) ) {
                $this->output( $this->donut_nav_bar( $this->content['navigation'] ) );
                unset( $this->content['navigation']['main'] );
            }
            $this->content[ 'navigation' ][ 'main' ][ 'donut-theme' ] = array(
                'url'      => 'https://github.com/amiyasahu/Donut',
                'label'    => 'Donut theme',
                'selected' => 0,
            );
        }

@amiyasahu
Copy link
Owner

No @yerbol89 , use it like below -

function body_header() // adds login bar, user navigation and search at top of page in place of custom header content
{
    if ( !empty( $this->content['navigation']['main'] ) ) {
        $this->content[ 'navigation' ][ 'main' ][ 'donut-theme' ] = array(
            'url'      => 'https://github.com/amiyasahu/Donut',
            'label'    => 'Donut theme',
            'selected' => 0,
        );

        $this->output( $this->donut_nav_bar( $this->content['navigation'] ) );
        unset( $this->content['navigation']['main'] );
    }
}
``

@yerbol89
Copy link
Author

@amiyasahu thanks its work.
After i'm 0 to 1 add class active. :)
I add after selected 'selected' => 1, class 'classs' => 'radio' work fine.

And i want one question?
How i open link new target blank page?
I add
'target' => '_blank'
but its not work.

function body_header() // adds login bar, user navigation and search at top of page in place of custom header content
{
    if ( !empty( $this->content['navigation']['main'] ) ) {
        $this->content[ 'navigation' ][ 'main' ][ 'donut-theme' ] = array(
            'url'      => 'https://github.com/amiyasahu/Donut',
            'label'    => 'Donut theme',
            'selected' => 1,
            'classs' => 'radio',
        );

        $this->output( $this->donut_nav_bar( $this->content['navigation'] ) );
        unset( $this->content['navigation']['main'] );
    }
} 

@amiyasahu
Copy link
Owner

Instead of changing the code, you should use Admin -> Pages -> Add Link option from admin panel. This will be less hassle. Sorry I misguided you to change the code.

@yerbol89
Copy link
Author

@amiyasahu i use Admin -> Pages -> Add Link option from admin panel. But first Donut theme delete class in li and open target blank not work. I enable open link new window but target blank dont work.

@amiyasahu
Copy link
Owner

I will check and fix in next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants