0

Currently on our site we have 4 weblink resources that are displaying in proper order (by the date on the title) on the page, but after adding one more weblink resource, it is added to the page but appears one below the first link, when it should be at the top.

I am not sure where to look to manually re-order these, and there doesn't seem to be any option to do this from the ModX interface or Resource Edit menu (setting the "index" does nothing).

Is there a way to accomplish this? Is it possible that this is custom and I need to find where the ordering is happening? I have looked in the Snippets folder for this page and wasn't able to find anything that looked like it was doing ordering.

Possibly related noob question: If we just want to manually re-order the links via html, how do we modify the source code directly, via ModX?

starmandeluxe
  • 2,443
  • 3
  • 27
  • 44

2 Answers2

1

If you are using a custom snippet to extract the links then modx will not be doing any ordering for you at all, that would need to be written into the snippet itself.

if you are using getResources, [ http://rtfm.modx.com/display/ADDON/getResources ] look up the sortby option in the docs. I'm not 100% sure what the default is.

if you are using WayFinder [ http://rtfm.modx.com/display/ADDON/Wayfinder ] the default sort order will be the order they appear in the resource tree, which I believe is menuindex. I believe WayFinder also has a sorting option. [see the docs]

if you are not seeing changes when moving things around in the resource tree, be sure to clear the cache as changes in the resource tree do not automatically refresh the cache.

to manually add the links into the page/resource, you need to find the chunk/snippet/template that is displaying the links and modify that accordingly.

Sean Kimball
  • 4,506
  • 9
  • 42
  • 73
  • Thanks. I looked under "Chunks" and there are some WayFinder chunks for the pages that hold the links I want to sort. Still, I can't find out where I would add sorting to these chunks, since they just seem to be formatting each link (list item) individually, and another chunk also references a now-defunct WordPress integration php snippet: http://allebrum.wordpress.com/2010/02/04/using-wordpress-inside-of-modx/ – starmandeluxe Apr 16 '13 at 20:56
  • ok - start in the templates, find out where/how the links are being output. wayfinder is the least likely method, getresources the most likely,. [what version of modx?] – Sean Kimball Apr 17 '13 at 14:05
  • It's MODx Evolution 1.0.5 (Jan 19th, 2011). The templates didn't show anything promising. I think it is using WayFinder; I don't see getresources, but there are several chunks using "[+wf.wrapper+]" and the WayFinder snippet is in place. I have a strong suspicion that it is related to the WordPress snippet that is called when the links are displayed, since I can clearly see a "sort($list)" in the php. Here is documentation on that snippet (http://modx.com/extras/package/wordpresstools), and after reading it I think that it is simply not connecting to the domain with the current credentials! – starmandeluxe Apr 17 '13 at 17:43
0

To manually re-order resources in "Resources Tree" you just need "drag-and-drop" by mouse to change the resources places.

Vasis
  • 2,281
  • 1
  • 16
  • 23