Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2014-08-23 22:19:58

volvoxturbo
Member
From: Barcelona - Frankfurt - Rome
Registered: 2012-11-12
Posts: 247
Website

kill default navigation problem / question

I would like to implement a side menu via phplugins and tried SidebarJS -> http://makotot.github.io/sidebar/

I used following code but it is not working is not working:

// KILL THE DEFAULT NAVIGATION MENU
// Using a series of three functions, you can completely gut the
// default navigation menu. Use this to author your own navigation.

// THIS FUNCTION REMOVES THE NAVIGATION SECTION FROM THE PAGE
function ttg_header_navigation( $style, $path ) {
    echo '
   
    <nav class="sidebar jsc-sidebar" id="jsi-nav" data-sidebar-options="">
    <ul class="sidebar-list">
        <li><a href="./" class="current">SidebarJS</a></li>
        <li><a href="http://github.com/makotot/sidebar/">View on Github</a></li>
        <li><a href="http://github.com/makotot/sidebar/releases">Download</a></li>
    </ul>
</nav>

    ';
    return false;
} // END


// THIS FUNCTION REMOVES THE DEFAULT STYLESHEET FOR OUR NAVIGATION
function ttg_style_navigation( $style, $path ) {
    echo '
   
       
        <link rel="stylesheet" href="http://oliver-blum.com/phplugins/css/lib/fontello.css" />
        <link rel="stylesheet" href="http://oliver-blum.com/phplugins/css/lib/normalize.css" />
        <link rel="stylesheet" href="http://oliver-blum.com/phplugins/css/index.css" />
       
        <link rel="stylesheet" href="http://oliver-blum.com/phplugins/css/sidebar.css" />

    ';
    return false;
} // END

// THIS FUNCTION REMOVES THE R2D2-MENU SCRIPT FROM THE PAGE
function ttg_scripts_navigation( $style, $path ) {
    echo '
   
        <script src="http://oliver-blum.com/phplugins/js/lib/jquery.min.js"></script>
       
        <script src="http://oliver-blum.com/phplugins/js/sidebar.js"></script>
       
        <script>
            $('#jsi-nav').sidebar({
                trigger: '.jsc-sidebar-trigger',
                scrollbarDisplay: true,
                pullCb: function () { console.log('pull'); },
                pushCb: function () { console.log('push'); }
            });</script>
           

    ';
    return false;
} // END


I would be glad, if someone could take time and help me out working with this...

Many thanks in advance
Best regards,
Oliver

Offline

#2 2014-08-24 00:17:53

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: kill default navigation problem / question

not sure what's going on. It looks like maybe a syntax error in the php. Do you have any other functions going on?

Also, all that css you're dropping in there, especially that normalize.css, may override some of the styling you've done in Lightroom.

And one more also: did you know that CE4 natively supports side navigation? Choose Column under Navigation Type
http://ce4.theturninggate.net/docs/doku … _container

Last edited by rod barbee (2014-08-24 06:38:00)


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2014-08-25 07:01:40

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: kill default navigation problem / question

CE4 is already "normalized". You don't need to include normalize.css.

I would blank the functions, test the page. Add each function back into the mix one-by-one, testing as you go. This is how you narrow down the problem, then having found it, you can work to fix it.


Matt

The Turning Gate, http://theturninggate.net

Offline

#4 2015-01-20 19:06:56

volvoxturbo
Member
From: Barcelona - Frankfurt - Rome
Registered: 2012-11-12
Posts: 247
Website

Re: kill default navigation problem / question

Happy new year :-)

I spent a lot of time to find out how to replace the r2d2 menu with a off-canvas site menu but didn't get it.

Can anyone please give a step-by-step advise on how to create a menu like Daniel Leu did it on his website?

That would be GREAT :-)

Thanks in advance,

best regards,
Oliver

Offline

#5 2015-01-20 22:00:25

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: kill default navigation problem / question

it looks to me that Daniel is using the R2D2 menu on the desktop version of his site, with the Column layout. This is built in to CE4 and he's customized the menu items with phplugins.
He's done some custom work for the mobile menu though. If I remember correctly, he's feeding a different menu set up to mobile devices. You can look at his page source to see the mobile menu structure and click on the link to his custom css file to see the styling.

But if you want to know how Daniel did it, just ask Daniel wink
He may even have a blog post about it. Or a post here on the forum. I do recall reading about it somewhere.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2015-01-21 10:06:44

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: kill default navigation problem / question

I use the default menu in the web-browser and have a custom menu on mobile. Sorry, I don't have a blog post for this.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#7 2015-01-31 01:04:46

volvoxturbo
Member
From: Barcelona - Frankfurt - Rome
Registered: 2012-11-12
Posts: 247
Website

Re: kill default navigation problem / question

Daniel,

that is exactly what I like to do. Using the integrated masthead navigation for desktop and a site or off-canvas menu for mobile and tablets. Your solution looks pretty good! May I ask how you used the phplugins? Do you used the KILL THE DEFAULT NAVIGATION MENU? And if, how???

Thx in advance
Best regards,
Oliver

Offline

#8 2015-01-31 01:56:14

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: kill default navigation problem / question

Hi Olivier,

Yes, I use what Matt described in Kill the Default CE4 Navigation. I leave the default menu in place because this is used on the desktop. But then I replace the navigation script with my own implementation. The mobile menu is created inside ttg_body_top().

One of these days I will document what I did, but haven't had a lot of spare time recently.


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#9 2015-01-31 02:00:48

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: kill default navigation problem / question

Just perusing Daniel's page source is an education in itself. You can see the structure he added to the page via phplugins, scroll to the bottom of the page to see the jQuery used to show and hide the mobile menu, and click on the custom.css link (end of head section) to see his css.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#10 2015-01-31 21:02:55

volvoxturbo
Member
From: Barcelona - Frankfurt - Rome
Registered: 2012-11-12
Posts: 247
Website

Re: kill default navigation problem / question

Hi Daniel,

I am going on checking it out and trying to understand :-) but it would be really helpfull if you could give just some little stuctured instruction what to do and where to insert what code ;-)

Thanks alot in advance

Best regards,
Oliver

Offline

Board footer

Powered by FluxBB