We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32319
    • 129 Posts
    I am using drop menu to create body content for section pages where I have a title that is the link followed by a description of the page which seemed perfect for DropMenu but I am running into a problem where dropmenu wants to format as follows:

    Link - Description

    And I want:

    Link
    Description

    This seemed fairly easy since I found the code that looked like:
    if ($showDescription && (!empty($child['$descriptionField']))) {
    					    $desc = " – ".$child['$descriptionField'];
    					} elseif ($showDescription && (!empty($child['description']))) {
    					    $desc = ' – ' . $child['description'];
    					} elseif ($showDescription && (!empty($child['introtext']))) {
    					    $desc = ' – ' . $child['introtext'];
    					} elseif ($showDescription && (!empty($child['longtitle']))) {
    					    $desc = ' – ' . $child['longtitle'];
    					} else {
    					    $desc = '';
    					}
    


    Which I replaced with:
    if ($showDescription && (!empty($child['$descriptionField']))) {
    					    $desc = "<br />".$child['$descriptionField'];
    					} elseif ($showDescription && (!empty($child['description']))) {
    					    $desc = '<br />' . $child['description'];
    					} elseif ($showDescription && (!empty($child['introtext']))) {
    					    $desc = '<br />' . $child['introtext'];
    					} elseif ($showDescription && (!empty($child['longtitle']))) {
    					    $desc = '<br />' . $child['longtitle'];
    					} else {
    					    $desc = '';
    					}
    
    


    Where all ’ &ndash; ’ are replaced with ’
    ’ but this seems to make no difference on the generated HTML. I searched for "&ndash; but could not find it elsewhere. I also could not find anywhere else that this appeared to be output.

    I am by no means a PHP expert so if anyone has any ideas here I would be greatful.
      "Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable."
      -- Sydney Harris
    • Is the page where you are doing this cached? Editing a snippet won’t clear the cache as editing a document will; I’ve often gnashed my teeth for more than an hour fighting with this issue until I remembered to clear the cache rolleyes
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 32319
        • 129 Posts
        Quote from: sottwell at Sep 25, 2006, 05:38 AM

        Is the page where you are doing this cached? Editing a snippet won’t clear the cache as editing a document will; I’ve often gnashed my teeth for more than an hour fighting with this issue until I remembered to clear the cache rolleyes

        I reset the cache in the manager for the whole site. I will also try just turning off the cache on the page and see if that helps. I also called the snippet using [!xyz!] format which I understand prevents it from being cached anyway. I also was seeing other changes take effect so I don’t think this is the issue.

          "Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable."
          -- Sydney Harris