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.
You are not logged in.
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
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
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
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
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
This looks great!
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline