1

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

1

1 Answer 1

1

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>
  </div>

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=";
}
1
  • i think that it miss a script to share the detail of job Commented Mar 3, 2019 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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