3

I have this code:

<link rel="canonical" href="{!$Setup.websiteSystemVariables__c.Main_URL__c+$CurrentPage.Name}"/>

I want to check where the $Setup.websiteSystemVariables__c and $CurrentPage.Name values are coming from.

When I view the page source, they are evaluated as:

<link href="xyz.comhomepageAB" rel="canonical" />

But I want to add a backslash between URL and page name like this URL:

 <link href="xyz.com/homepageAB" rel="canonical" />

I researched classes, components but I m not able to solve this... Thanks !!

2

You can just concatenate the slash character in the merge syntax:

<link rel="canonical" href="{!$Setup.websiteSystemVariables__c.Main_URL__c + '/' + $CurrentPage.Name}"/>
0
1

A few years late, but you can find the value of $Setup.websiteSystemVariables__c by going to Quick Find and searching for 'Custom Settings'.

You will find one called 'websiteSystemVariables' (or something similar) which contains all the custom settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.