4

I created a VF page (banner) and inserted it on the contact page layout (lightning). All is good except for the fact that the VF page name appears above my component. I just want it to not show anything. Is there any way to remove this label and have nothing?

<apex:page standardcontroller="Contact" standardstylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="x-ua-compatible" content="ie=edge" />
    <title>Salesforce Lightning Design System Trailhead Module</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <!-- Import the Design System style sheet -->
    <apex:slds />
</head>

<style>
    <apex:stylesheet value="{!URLFOR($Resource.pwc_lightning, 'assets/styles/salesforce-lightning-design-system-vf.css')}" / > div {
        background-color: #77dd77;
        display: block;
        height: 100px;
    }

    body {
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    p {
        text-align:center;
        font-weight:bold;
        font-size:20px;
    }

</style>
<body>

    <!-- REQUIRED SLDS WRAPPER -->
    <div class="slds-scope">


        <!-- / MASTHEAD -->
        <!-- PAGE HEADER -->
        <!-- / PAGE HEADER -->
        <div class="pwc-lightning">
            <apex:outputpanel id="out" layout="block">
                <div><span><p>DO NOT EMAIL!</p></span></div>
            </apex:outputpanel>
        </div>
    </div>
</body>

enter image description here

0

3 Answers 3

4
+50

If you are really that desperate to get rid of the label why not embed the VF page inside a Lightning component and embed the lightning component inside the object page instead of using the visualforce component.

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
    <iframe src="{!'https://praowin-dev-ed--c.gus.visual.force.com/apex/testpage?Id=' + v.recordId }" width="100%" height="100%" frameBorder="0"/>
</aura:component>

VF embedded as iframe inside a lightning component:

enter image description here

0
3

It took a little trial and error, but I was able to solve it by using the "No-Break Space" unicode character (U+00A0) as the Visualforce lightning component title.

2
  • Nice, this worked! You can type this character by holding "Alt" and hitting "0160" on the numpad.
    – Egor
    Commented Apr 5, 2019 at 5:34
  • Option spacebar on a mac Commented May 16, 2019 at 21:16
0

Something this simple doesn't require a Visualforce page - just use a Rich Text Snippet and 'Edit Page' to insert the component.

Apply a filter to conditionally show the message. In this case your filter would look at your Email Opt Out field.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .