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

Dynamic landing pages based on record

I am designing a website on top of communities. My homepage dsiplays recently submitted records and top voted records (up to 10) using data repeaters. I would like to have the title of each record utilized as a link that would take the user to a visualforce landing page that shows the details of that record. Since the records on my homepage will be dynamically updated, how do I have my landing pages follow suit?

Any ideas and/or strategies?

Just send the appropriate record id as a parameter on the URL for the Visualforce page.  If the records are of different sObject types, you will need to use a custom controller to know what to do with each different type of object.
Wizno @ ConfigeroWizno @ Configero
Are you using the Communities Builder or VF/Apex for the pages? Either way you should be able to hide/display content based on the record type via CSS or an apex components rendered attribute. 
I am using html based visualforce pages. Ideally, I would like to have one landing page that would load information based on the record link that was clicked. So, upon clicking the record title, I am sent to a landing page (full visualforce) that shows the information of that record. If I click on another record on the previous page, I am sent to the same landing page, but the information reflects the record I clicked on. 
Wizno @ ConfigeroWizno @ Configero
In that case you can use 
<apex:outputPanel Rendered="{! YourSObject.SomeField == "Some Value"}">



Then for the Content you can add in your other apex/html tags, or utilize composition/templates to make things cleaner.
Read more about Composition/Templates: