Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8974861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:45:23+00:00 2026-06-15T18:45:23+00:00

Ok. Not sure this is a good idea. I’m building a template which passes

  • 0

Ok. Not sure this is a good idea. I’m building a template which passes a JSON config to a Javascript file assembling the template.

For links I need to include some logic how to build them in my JSON config. I would have to call this:

path.href.replace( /.*view=/, "" ) + ".cfm?id="+content.vcard.adresses[1]["iln/gln"]

Which in my config JSON:

<ul data-template="true" data-config='{  
    "type":"listview",
    "link":"path.href.replace( /.*view=/, '' ) + '.cfm?id='+content.vcard.adresses[1]['iln/gln']",
    "iconpos":"right"
    }'></ul>

Will not work because of quotation-mark-mess, so the JSON is valid, but wrapping it in single quotes messes the HTML up.

Question:
Is there any way to pass this without breaking the HTML? Since it’s a template I would like to keep the javascript logic as clean as possible = not put in custom methods for every template instance. So I would like to keep the method call here.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:45:24+00:00Added an answer on June 15, 2026 at 6:45 pm

    You can escape quotation marks using the &#39; HTML entity:

    <ul data-template="true" data-config='{  
        "type":"listview",
        "link":"path.href.replace( /.*view=/, &#39;&#39; ) + &#39;.cfm?id=&#39;+content.vcard.adresses[1][&#39;iln/gln&#39;]",
        "iconpos":"right"
        }'></ul>
    

    Here is a demonstration: http://jsfiddle.net/fVLPd/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not entirely sure of a good title for this, feel free to edit it
I am not sure if this is 'good python practice', but would it be
I am in dilemma situation. I am not sure if its a good idea
I am not sure if its a good idea, but i just thought it
Need opinions on this, what do you guys think? A good idea or not
Not sure this is a known issue. I’m using VS2012 RC (Ultimate), and Win8
Not sure this is possible, but looking to write a script that would return
Disclaimer: not sure this is WordPress related or not. I'm following a simple tutorial
I'm not sure this is the right forum if it's not please feel free
I'm not sure this is even possible but I know if it is, the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.