+ Start a Discussion
mmixmmix 

Suppress the footer of the pageBlock?

Is that possible? I want to get the L&F of a related list page block, e.g. it has a header but no footer.

 

I tried using the footer facet to suppress content, but it only suppresses the inside content of the footer, not the footer itself, which produces a very ugly two-line output (I only want to show the lower bended line which closes the page block). Unfortunately there seems to be no attribute on page block to be able to suppress it... Any ideas?

 

 

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
mtbclimbermtbclimber

So if you don't want a footer, don't include the footer facet.  If the "ugly" line you are referring to is what I think it is it's part of the footer. The footer only appears if you include the facet or pageBlockButtons with a location of "bottom" or "both" (default).

 

Finally, please use the toolbar button to paste in sample code to avoid the smileys.

All Answers

mtbclimbermtbclimber
Can you include a very basic page definition that forces the aspect you are trying to suppress?
mmixmmix

Well, effectively I have an object that is many-to-many against itself (I use an intermediary object to hold the relations), so in the default view of the object the related lists show the rows from relation table. I am trying to replace this page with one that actually loads the related objects information in the related lists (instead of just links) which means I use the default apex:detail plus two custom pageblocks for my related lists.

 

Its actually quite easy to reproduce what I experience, just create a apex:pageBlock and then add this facet to it:

 

<apex:facet name="footer">

<apex:outputText value="" />

</apex:facet>

 

and you will see what I mean, I just want to get rid of the upper of the two lines as it really looks ugly, plus I want it to look as much as possible like the factory related list look & feel.

mtbclimbermtbclimber

So if you don't want a footer, don't include the footer facet.  If the "ugly" line you are referring to is what I think it is it's part of the footer. The footer only appears if you include the facet or pageBlockButtons with a location of "bottom" or "both" (default).

 

Finally, please use the toolbar button to paste in sample code to avoid the smileys.

This was selected as the best answer
mmixmmix

I just tested it on IE and now it behaves completely different, the bottom curved line dissapeared and the thin line spearating client and footer sections remained? Really weird

 

Anyway, if there is no way for me to suppress the footer without adverse visual effects, can I at least make it blank? By default it shows the same buttons that were placed in header (with apex:pageBLockButtons) and its messing things up. How can i output something blank (like &nbsp;) into footer?

 

Just using <apex:facet name="footer" /> does not work.

mmixmmix

Ok, got it. the buttons are by default "both" and that caused all my problems, no facet + location="top" fixed the problem.

 

THanks.