We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18646
    • 106 Posts
    I think this should be easy, but.....here goes.
    This is a chunk that’s being used by a ditto call:

    <a href="[(base_url)]assets/templates/default/career_popup.html?l=&p=[+title:uri+]&id=[+position_type+]" title="Apply for Position" rel="superbox[iframe][684x476]">


    I’ve installed the PHX custom modifier for URI Encoding. The simple PHX call is above: [+title:uri+]

    This should encode the page title in question and pass it to the URL, but it returns nothing. I’ll take any ideas. Thanks!

    Regards,
    Matt
      • 18646
      • 106 Posts
      Why is no one responding to this? Is my question completely off base? Or am i missing something painfully obvious? huh

      Regards,
      Matt
        • 26931
        • 2,314 Posts
        [+title:uri+]? is it a custom TV or do you actually mean [+pagetitle:uri+]
        does [+title+] return anything?
        ...and maybe try Ditto’s &hiddenFields=`` parameter -> http://ditto.modxcms.com/tutorials/phx-and-nested-tags.html
          • 18646
          • 106 Posts
          It must be Monday. I wasn’t looking at the source code. Instead i was looking at the URL in the address bar. Indeed, [+pagetitle:uri+] DOES encode the URL in the source. This topic is closed. Thanks sharkbait rolleyes

          Regards,
          Matt
            • 31090
            • 2 Posts
            I have this website wich uses a ditto call like this

            [[Ditto? &parents=`898` &tpl=`story_summary`]]

            story_summary looks like this


            [+type:is=`reference`:then=`{{document_template}}`:else=`{{reference_template}}`+]

            I also use PHX for conditional chunks inside story_summary


            {{{document_template}} looks like this

            <div class=’photo’ style=’width: 100%;padding:0’>
            <div id=’photo_container’>

            [[MaxiGallerySolo? &galIDs=`[+id+]` pics_to_show=`1` &type=`random` &open=`gallery_overview`]]
            <!-- <img src=’assets/galleries/84/204_hotel-regente.jpg’ alt=’[+menutitle+]’ width=’194’ height=’111’ class=’main’><img class=’minor’ src=’assets/templates/klasstour/images/frame.gif’ alt=’[+menutitle+]’>-->


            </div>
            <div style=’padding-left: 15px;float:left;width:460px ’>
            <h3><a href=’[~[+id+]~]’ title=’[+menutitle+]’>[+menutitle+]</a></h3>
            <p>[+description+]</p>
            </div>
            <div style=’float: left;padding-left: 15px;’>
            <a class=’btn-detalii’ href=’[~[+id+]~]’ title=’[+menutitle+]’>Detalii oferta</a>
            </div>
            <div style=’float: right’>
            de la <span><b> [+introtext+]</b></span>
            </div>
            </div>
            <div style=’clear: both; padding: 10px;’></div>

            and {{reference_template}} looks like this

            <div class=’photo’ style=’width: 100%;padding:0’>
            <div id=’photo_container’>
            <img src=’assets/galleries/84/204_hotel-regente.jpg’ alt=’[+menutitle+]’ width=’194’ height=’111’ class=’main’><img class=’minor’ src=’assets/templates/klasstour/images/frame.gif’ alt=’[+menutitle+]’>

            </div>
            <div style=’padding-left: 15px;float:left;width:460px ’>
            <h3><a href=’[~[+id+]~]’ title=’[+menutitle+]’>[+menutitle+]</a></h3>
            <p>[+description+]</p>
            </div>
            <div style=’float: left;padding-left: 15px;’>
            <a class=’btn-detalii’ href=’[~[+id+]~]’ title=’[+menutitle+]’>Detalii oferta</a>
            </div>
            <div style=’float: right’>
            de la <span><b> [+introtext+]</b></span>
            </div>
            </div>
            <div style=’clear: both; padding: 10px; ’></div>



            The problem is that any placeholder inside those chunks won’t work, except the [~[+id+]~]



            or how can i make conditional chunks inside a ditto call like this : " [[Ditto? &parents=`898` &tpl=`story_summary`]]"
            to show me something if page is reference or something if page is document

            Any help would be apreciated

              • 31090
              • 2 Posts
              I resolved it this way:

              I edited MaxiGallerySolo and

              put the condition if $pic[’gal_id’] was not set... just show static image.
              If $pic[’gal_id’] was not set that ment no gallery was set for current document, wich ment it was reference
              So, for every reference type document, i am am showing a static image in my sumary_story chunk.