We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53014
    • 1 Posts
    In the screen capture share here https://drive.google.com/file/d/0B3H7-NtOH_xteTBqMHl1Y2U2NzQ/view?usp=sharing
    I am trying to display subscription fees when the user select a club than a subscription plan (National, Continental, International).

    Each option here is linked to ressource, so with this jQuerry script
    <script>
    $(document).ready(function () {
            $('input[name=modeadhesion]:radio').click(function () {
    			var html="[[$chunk_ getresources ?&id=`"+$("#club_name").val()+"` ]]";
    	 	$('#result').html(html); 
        });
        });
    </script>
    
    I am trying to get the id of the ressource in order to display the value of the fees when he select the subscription plan via a getRessource snippet
    [[!getResources:default=`Aucun resultat trouvé.`?
     &parents=`-1`
      &tpl=`chunk_result`
      &includeTVs=`1`
      &showHidden=`1`
      &limit=`1`
      &includeContent=`1`
      &hideContainers=`1`
      &resources=`[[+id]]`
    ]]
    


    The problem is that it can't display any result from the ressource even the pagetitle
     [[+pagetitle]]
    as if the id is retrieved as a string and can't be converted.
    When I mannually add the id of the ressource, everything is OK.

    Please help.
      • 3749
      • 24,544 Posts
      It sounds like you want the ID of the current resource. That would be:

      [[*id]]


      The tag you have is a placeholder tag. That will only work if it's in a Tpl chunk used with getResources or a similar snippet.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting