We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23383
    • 138 Posts
    Hello,

    I’d like to see my webusers on a page, and I’d like to be able to click on them to see their profile, in web navigation not in manager.
    I’ve seen the usage of TV with datagrid widget, so I’ve done the first part (see them) smiley
    But I’ve a problem with the other part:
    I’ve done a page which can shows me the profile of a webuser if i can get his id or fullname.
    My question is : how can I link to this page (and pass the id)?
    I used ColumnType like it is shown in the documentation.

    I’ve seen we can use Hyperlink but there is no more documentation on that.... The only thing I can get is to return to my base_url :s
    I’ve also seen this : http://modxcms.com/forums/index.php/topic,1784.0.html but I don’t understand how to use "template:" and moreover, i have bugs like this when I try to edit my TV:


    Could someone help me to have this working? =D

    Thank you,

    PS : Sorry for my poor English !

      • 23383
      • 138 Posts
      I tried to modify the insert (of my TV) in the modx database and inserted template:<a href="[~30~]"> [+value+] </a> but it don’t work...
      Am I missing something ?
        • 32963
        • 1,732 Posts
        Quote from: pikachu320 at Jul 19, 2006, 01:21 AM

        I tried to modify the insert (of my TV) in the modx database and inserted template:<a href="[~30~]"> [+value+] </a> but it don’t work...
        Am I missing something ?

        Nah you’re not doing anything wrong. The problem is that there’s a bug in MODx that will not redisplay the " character inside the textbox.

        Here a quick fix for manager/actions/dynamic/mutate_tmplvars.dynamic.action.php :

        Add this js function just below the decode() function:
        function htmlspecialchars(s) {
        	var s = s.replace(/&/g,"&");
        	s = s.replace(/</g,"<");
        	s = s.replace(/>/g,">");
        	s = s.replace(/"/g,'"');
        	return s;
        }


        then modify the following lines as shown below:

        case 'float':
        	c = '<input type="text" name="prop_'+key+'" value="'+htmlspecialchars(value)+'" size="30" onchange="setParameter(\''+key+'\',\''+dt+'\',this)" />';
        	break;
        
        default:  // string
        	c = '<input type="text" name="prop_'+key+'" value="'+htmlspecialchars(value)+'" size="30" onchange="setParameter(\''+key+'\',\''+dt+'\',this)" />';
        	break;
          xWisdom
          www.xwisdomhtml.com
          The fear of the Lord is the beginning of wisdom:
          MODx Co-Founder - Create and do more with less.
          • 23383
          • 138 Posts
          Really nice for double quotes , it don’t bug anymore ! Thank you !!! ...
          Btw, i still have <a href%3d="" index.php?id="30> for link (I tried to change encode et decode functions, but i didn’t get any results)

          I have used the concat method I’ve found in this forum to have the url working.
          But It still remains something to get all working for me...
          Now, I have url with [~id~]&internalKey=number. How can i get the internal Key number on the page [~id~] ? I suppose to set a placeholder, but i don’t know where (and how) to do it in the widget (or somewhere else)....
          I’ll try parsing URL but I don’t think it’s a good way to implement that.

          Thank you,

            • 32963
            • 1,732 Posts
            Hi,

            Use [++] for the field names. What SQL are you using to retrieve the web user data?
              xWisdom
              www.xwisdomhtml.com
              The fear of the Lord is the beginning of wisdom:
              MODx Co-Founder - Create and do more with less.
              • 23383
              • 138 Posts
              Quote from: xwisdom at Jul 19, 2006, 01:58 PM

              What SQL are you using to retrieve the web user data?

              You mean which query ? my query is :

              @SELECT CONCAT(CONCAT(CONCAT(CONCAT("<a href=’[~30~]&internalKey=",modx_web_user_attributes.internalKey),"’>"),modx_web_user_attributes.fullname),"</a>")
              AS fullname,dob, country FROM modx_web_user_attributes

              (if i write it clearly my request will do :
              SELECT <a href=’[~id~]&internalKey="modx_web_user_attributes.internalKey" ’>modx_web_user_attributes.fullname </a>
              AS fullname,dob, country FROM modx_web_user_attributes )

              I know my query is a little dirty... but it’s the only way I found to have a link as the fullname :s

              Solved : I found a way to have the internalKey smiley
              Just created a snippet on the page ([~id~]) with :

              $key = $_GET[’internalKey’];