• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Wrap href from one CF tag around another

New Here ,
Jul 01, 2014 Jul 01, 2014

Copy link to clipboard

Copied

Hi!

I have a tag called #PubsPageLink# that contains an href link, but I want the #title# tag to use that same variable, as well.

Obviously, using... <a href='http://#PubsPageLink#'>#title#</a> ...is too simplistic an approach. But what would be an effective way to grab that href variable and apply it to separate tag?

#PubsPageLink# is currently setup to output a text link that reads "Read More..."


<cftry>

<CFQUERY NAME="Pubs" datasource="Library" maxRows="4">

SELECT citation, title, journalName, PubsPageLink,

Year(FROM_UNIXTIME(Pubs.datePublishedConfirmed)) AS Date

FROM Pubs

ORDER Pubs.DatePublishedConfirmed DESC

</cfquery>

<cfoutput query="Pubs">

<cfif #citation# is not "">

                   

<strong>#title#</strong> | #PubsPageLink# <em>#journalName#</em> #date#

<br><br>

</cfif></cfoutput>

<cfcatch></cfcatch>

</cftry>

Views

95

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation