I have created a module that enable the client to apply for job and iw ant to add in the page of detail of offer job 3 button :facebook, linkdin, twitter so how do do that without using extension any help please


in your phtml file paste this code

 <div class="iconss">
                <?php $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";?>
                 <a href=<?php echo $block->getTwitterlink().$actual_link?>> <i class="fab fa-twitter"></i></a>
                 <a href=<?php echo $block->getFacebooklink().$actual_link?>> <i class="fab fa-facebook-f"></i></a>
                 <a href=<?php echo $block->getPinterestlink().$actual_link?>> <i class="fab fa-pinterest"></i></a>

in your block file create following functions

public function getFacebooklink(){
    return "https://www.facebook.com/sharer/sharer.php?u=";
public function getPinterestlink(){
    return "https://pinterest.com/pin/create/button/?url=";

public function getTwitterlink(){
    return "https://twitter.com/home?status=";
  • i think that it miss a script to share the detail of job – Developper Magento Mar 3 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.