Skip to content

Overriding the output

Nicholas K. Dionysopoulos edited this page Apr 22, 2022 · 2 revisions

Akeeba Social Login uses JLayout "micro-layouts" to render the login, link and unlink buttons. If you are not sure how to override them please consult Joomla's documentation on JLayout overrides.

Login buttons

The information on customising login buttons ONLY APPLIES TO JOOMLA 3. Joomla 4 uses its own layouts to render additional login buttons. It does not use any layouts we ship with our software.

Login buttons allow users to log into the site using their social media accounts. These buttons are rendered by two separate JLayouts, akeeba.sociallogin.button and akeeba.sociallogin.buttons. The former renders one button, the latter puts all of the individually rendered buttons into a unified output.

The button layout

What does it do: renders a single login button

Original location: plugins/system/sociallogin/layout/akeeba/sociallogin/button.php

Override location: templates/YOURTEMPLATE/html/layouts/akeeba/sociallogin/button.php

The login buttons layout

What does it do: takes the rendered buttons and outputs them into the final HTML structure which will be output to the page.

Original location: plugins/system/sociallogin/layout/akeeba/sociallogin/buttons.php

Override location: templates/YOURTEMPLATE/html/layouts/akeeba/sociallogin/buttons.php

Link / unlink buttons

Link / unlink buttons allow users to link their Joomla! user accounts to their social media accounts. If they are already linked, they let them remove the link (unlink). These buttons are rendered by two separate JLayouts, akeeba.sociallogin.linkbutton and akeeba.sociallogin.linkbuttons. The former renders one button, the latter puts all of the individually rendered buttons into a unified output.

The button layout

What does it do: renders a single link / unlink button

Original location: plugins/system/sociallogin/layout/akeeba/sociallogin/linkbutton.php

Override location: templates/YOURTEMPLATE/html/layouts/akeeba/sociallogin/linkbutton.php

The login buttons layout

What does it do: takes the rendered buttons and outputs them into the final HTML structure which will be output to the page.

Original location: plugins/system/sociallogin/layout/akeeba/sociallogin/linkbuttons.php

Override location: templates/YOURTEMPLATE/html/layouts/akeeba/sociallogin/linkbuttons.php

Integration-specific layouts

Each plugin can have a special JLayout for rendering its own button. If a special JLayout is found it is used instead of the generic JLayout mentioned above. In the following sections we assume that you are using an integration called mysocialnetwork.

Login button

LOGIN BUTTON LAYOUTS ARE ONLY AVAILABLE ON JOOMLA 3. THEY DO NOT EXIST FOR AND WILL NOT WORK WITH JOOMLA 4.

What does it do: This layout renders a single login button.

JLayout name: akeeba.sociallogin.button.mysocialnetwork where mysocialnetwork is the name of the plugin (the name of the folder inside plugins/sociallogin where the integration lives).

Override location: templates/YOURTEMPLATE/html/layouts/akeeba/sociallogin/button/mysocialnetwork.php

IMPORTANT! The layout override is in a subdirectory of the location where the generic layout overrides for buttons usually live.

We recommend copying the original, generic, button JLayout from plugins/system/sociallogin/layout/akeeba/sociallogin/button.php into the override location and customize it. The original file has comments detailing the information being passed to the layout and what they are used for.

Link / unlink button

What does it do: This layout renders a single link or unlink button.

JLayout name: akeeba.sociallogin.linkbutton.mysocialnetwork where mysocialnetwork is the name of the plugin (the name of the folder inside plugins/sociallogin where the integration lives).

Override location: templates/YOURTEMPLATE/html/layouts/akeeba/sociallogin/linkbutton/mysocialnetwork.php

IMPORTANT! The layout override is in a subdirectory of the location where the generic layout overrides for link buttons usually live.

We recommend copying the original, generic, button JLayout from plugins/system/sociallogin/layout/akeeba/sociallogin/linkbutton.php into the override location and customize it. The original file has comments detailing the information being passed to the layout and what they are used for.