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 2018-10-23 04:33:46

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

How to customize the Top Pallet?

Hi all,

How can I customize the widget-container in the top-pallet with phplugins?

I activated the Search Button and Language Selector in Backlights backend and added the following in the phplugins.php:

// Top Pallet Links
function social_bottom() {
    echo '

    <li id="home"><a href="/"><i class="fa fa-home" title="Home"></i></a></li>
    <li id="contact"><a href="/contact/"><i class="fa fa-envelope-o" title="Contact"></i></a></li>

   
    ';
    return false;
} // END /**/

It works well as you can see at my homepage https://www.oliverblum.com

Now, how can I change the order i.e. make all 4 items just in phplugins and multilanguage?

Thank you in advance,
best regards,
oliver

Offline

#2 2018-10-23 04:52:01

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

Re: How to customize the Top Pallet?

To change the order I would create all items in phplugins. Look at the source code of your page to identify which objects you need to add, eg. search and disable them in Backlight 2.

For multi-language support, it should be sufficient to add the proper attributes (data-lang="de") as shown in the documentation at http://backlight.theturninggate.net/doc … ge_support.


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

Offline

#3 2018-10-23 04:57:28

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

Re: How to customize the Top Pallet?

Hi Daniel,

thats exactly what I wanted to do, but doesnt work with

// Top Pallet Links
function social_bottom() {
    echo '
<div data-lang="en">
    <li id="home"><a href="/"><i class="fa fa-home" title="Home"></i></a></li>
    <li id="contact"><a href="/contact/"><i class="fa fa-envelope-o" title="Contact"></i></a></li>
</div>
   
    ';
    return false;
} // END /**/

Offline

#4 2018-10-23 05:17:56

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

Re: How to customize the Top Pallet?

I think you need to use something like this:

    <li data-lang="en" id="contact"><a href="/contact/"><i class="fa fa-envelope-o" title="Contact"></i></a></li>
    <li data-lang="de" id="kontakt"><a href="/kontakt/"><i class="fa fa-envelope-o" title="Kontakt"></i></a></li>

Note, I haven't tested this!

Putting a div around the two list items (<li>...</li>) doesn't work since they are both part of an unordered list (<ul>...</ul>).

BTW, I like how you are supporting two languages! I don't have an intention to add this to my page, but if I would, I replaced the globe with EN and DE depending on the currently active language. This seems a bit more intuitive to me and more common around the web.


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

Offline

#5 2018-11-21 03:04:49

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

Re: How to customize the Top Pallet?

Thank you Daniel,

solved it by embedding

function social_bottom() {
    echo '
   
    <li id="language"><a href="/?language=en">EN</a> | <a href="/?language=de">DE</a> | <a href="/?language=es">ES</a></li>

    ';
    return false;
} // END /**/


in phplugins.php

Best regards,
Oliver

Last edited by volvoxturbo (2018-11-21 03:06:08)

Offline

#6 2018-11-21 03:40:12

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

Re: How to customize the Top Pallet?

This looks great!


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

Offline

Board footer

Powered by FluxBB