You need to sign in to do that
Don't have an account?
Ratheven Sivarajah
How to avoid ?isdtp=p1 parameter getting appended to an URL
I have created a VF page which has a command link that take me to my desired link but there is istdp p1 at the end of the URL which I dont want. Thank you in advance.
<apex:page controller="TechnologyProduct" lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false">
<div id="wrapper">
<apex:repeat value="{!TechnologyProduct}" var="res" id="repeat">
<apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
<apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>
</apex:outputPanel>
</apex:repeat>
</div>
</apex:page>
<apex:page controller="TechnologyProduct" lightningStylesheets="true" showHeader="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false">
<div id="wrapper">
<apex:repeat value="{!TechnologyProduct}" var="res" id="repeat">
<apex:outputPanel rendered="{!res.Detail_Link__c != null}" layout='none'>
<apex:outputlink value="{!res.Detail_Link__c}" styleClass="btn" id="button"> {!res.Detailed_Product_Name__c} </apex:outputlink>
</apex:outputPanel>
</apex:repeat>
</div>
</apex:page>
You can modify the value of the apex:outputLink to exclude the isdtp parameter. For example:
This code uses the LEFT and FIND functions to exclude the isdtp parameter from the URL. The LEFT function returns the first part of the string, up to the position specified by the FIND function. The FIND function returns the position of the isdtp parameter in the URL, and subtracting 1 from that position gives us the length of the URL without the isdtp parameter.
To avoid the "?isdtp=p1" parameter from being appended to the URL, you can add the "isdtp" parameter as part of the URL and set it to "null". Here's an example: