function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pal2011Pal2011 

Render PageBlock Section "Title" dynamically

Hi,

 

How can I render pageblocksection "title" dynamically?

 

Example:

<apex:pageBlockSection id="RD"title="Registration Details"columns="1">

 

Is it possible to change "Registration Details" to "Registration Details 1", based on the parameters getting on the URL?

 

Thanks,

 

vishal@forcevishal@force

Yes, you can do that directly from your Page using global variables or you can bind your title to a string variable in your class which will get value from url parameter in your constructor.

 

For your reference using global variable directly on page, this should help you :

 

<apex:pageBlockSection title="{!$CurrentPage.parameters.title}">
            HAHA!
</apex:pageBlockSection>

 


Here, title is your paremeter.

 

https://c.ap1.visual.force.com/apex/MatrixTable?title=myopportunities will give you title as "myopportunities"

Pal2011Pal2011

Thanks for the reply. But, I don't need to display title from the parameters. Let's say

 

https://c.ap1.visual.force.com/apex/MatrixTable?region=Nafta

 

<apex:pageBlockSection title="Registration">
            HAHA!
</apex:pageBlockSection>

 

or

 

https://c.ap1.visual.force.com/apex/MatrixTable?region=apac

 

 <apex:pageBlockSection title="Registration 1 ">
            HAHA!
</apex:pageBlockSection>