Errors on links - Forum | JoomShaper
Awaiting an answer SP Page Builder

Errors on links

Asked by MWAR 5 years ago Last activity 5 years ago

Any way to add an link atribute option to the page builder?
rel="noreferrer"

2 replies

Rashida Rahman Staff

Hi there!

Thanks for your query.

Would you please explain the query a bit more, kindly?

That will be helpful for me.

Best Regards

MWAR Asked this

Sure, I would like to see you add an option into the SP Pagebuilder features that would allow you to select the " rel="noopener" options
https://www.w3schools.com/tags/att_a_rel.asp

<a href="/http://example.com" target="_blank" rel="noopener">
Example site
</a>

I've hard coded mine but have to update the files everytime I do an update to the SPPagebuilder

Example in components/com_sppagebuilder/addons/feature/site.php
lines 158 to 182 in the Components folder

            $output .= '<a' . $attribs . ' class="sppb-btn ' . $btn_class . '" rel="noreferrer">' . $btn_text . '</a>';
        }
        $output .= '</div>';
    } else if ($icon_image_position == 'after') {
        $output .= ($title) ? $feature_title : '';
        $output .= ($media) ? $media : '';
        $output .= '<div class="sppb-media-content">';
        $output .= $feature_text;
        if($btn_text){
            $output .= '<a' . $attribs . ' class="sppb-btn ' . $btn_class . '" rel="noreferrer">' . $btn_text . '</a>';
        }
        $output .= '</div>';
    } else {
        if($media) {
            $output .= '<div class="sppb-media">';
            $output .= '<div class="pull-'. $icon_image_position .'">';
            $output .= $media;
            $output .= '</div>';
            $output .= '<div class="sppb-media-body">';
            $output .= '<div class="sppb-media-content">';
            $output .= $image_icon;
            $output .= ($title) ? $feature_title : '';
            $output .= $feature_text;
            if($btn_text){
                $output .= '<a' . $attribs . ' class="sppb-btn ' . $btn_class . '" rel="noreferrer">' . $btn_text . '</a>';
Log in to reply.