Web Connection
Nested ASP-type tags and GetRelativeSecureLink within an html template file
Gravatar is a globally recognized avatar based on your email address. Nested ASP-type tags and GetRelativeSecureLink within an html template file
  Chris ODonnell
  All
  Sep 4, 2020 @ 02:24pm

The method GetRelativeSecureLink supports an optional logical secure or non-secure parameter. The syntax is...

o.GetRelativeSecureLink(lcLink,llNonSecure)

I am trying to parameterize the llNonSecure value within an html template file referenced in an ExpandTemplate call. However, the call to GetRelativeSecureLink itself is in a tag within the template file. Which looks something like:

<a href="<%= Request.GetRelativeSecureLink([viewstatus.cfm], .t.) %>?clientid=<%=poAccount.pkid%>">

I'm looking to convert that " .t. " parameter in the line above to something like: <%=pcNonSecure%>

But i cannot get the syntax correct or determine the right construct, either thru nesting or concatenating parm values.

Gravatar is a globally recognized avatar based on your email address. re: Nested ASP-type tags and GetRelativeSecureLink within an html template file
  Rick Strahl
  Chris ODonnell
  Sep 4, 2020 @ 02:58pm

Just create a variable in the Process class (or in the script code above the expression):

In process code:

PRIVATE plNonSecure && not really necessary since it's private by default
plNonSecure = .T.

or alternately in the script page (using ExpandScript())

<%
   plNonSecure = .T.
%>

Then in the template body with the HTML expression:

<a href="<%= Request.GetRelativeSecureLink([viewstatus.cfm], plNonSecure) %>?clientid=<%=poAccount.pkid%>">

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Nested ASP-type tags and GetRelativeSecureLink within an html template file
  Chris ODonnell
  Rick Strahl
  Sep 4, 2020 @ 05:42pm

Thanks for the reply. I was hoping that it was a simple issue. But not an extraordinarily simple issue.

© 1996-2024