Errors On Links - Question | JoomShaper

Errors On Links

M

MWAR

SP Page Builder 4 years ago

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

0
2 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 4 years ago #21403

Hi there!

Thanks for your query.

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

That will be helpful for me.

Best Regards

0
M
MWAR
Accepted Answer
4 years ago #21425

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>';
0