Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu order for special pages
#1
Hi,

I am using the following in my page

(% searchresults tags:bod numWords:25 order:-menuOrder%)

but it is not working and so I have not understood how to control the sort order of my special pages with menuorder.

http://dev.pweaveanea.org/index.php?id=p...-directors

I have to have the order by the title of the BOD member rather than alphabetical or by the date entered as updates may take place at any time. So my thought was to control the order by the menuorder which I found mentioned in the thread below.

http://get-simple.info/forums/showthread...47&page=11

I see from the thread they are using this in the template rather than the page as I am trying, but I am not sure where to add it, or the proper syntax.

Can anyone offer some insight? I appreciate any suggestions.
Reply
#2
(2013-10-01, 07:52:42)sarnaiz Wrote: Hi,

I am using the following in my page

(% searchresults tags:bod numWords:25 order:-menuOrder%)

but it is not working and so I have not understood how to control the sort order of my special pages with menuorder.

Works for me, e.g. (% searchresults tags="_parent_get-simple" words= order=-menuOrder %)
Are you sure, you are using the newest version (2.11) of I18N Search?

Of course "menuOrder" makes only sense, if all pages in the result list have the same parent page, otherwise you would (probably) see all the first items of all parents, then the second items, etc.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
(2013-10-01, 18:58:24)mvlcek Wrote:
(2013-10-01, 07:52:42)sarnaiz Wrote: Hi,

I am using the following in my page

(% searchresults tags:bod numWords:25 order:-menuOrder%)

but it is not working and so I have not understood how to control the sort order of my special pages with menuorder.

Works for me, e.g. (% searchresults tags="_parent_get-simple" words= order=-menuOrder %)
Are you sure, you are using the newest version (2.11) of I18N Search?

Of course "menuOrder" makes only sense, if all pages in the result list have the same parent page, otherwise you would (probably) see all the first items of all parents, then the second items, etc.

Hi Martin,

I have tried (% searchresults tags="bod" order=+menuOrder %)
http://dev.pweaveanea.org/index.php?id=p...-directors

on this page, and all kinds of permutations of this, but still no luck in getting the special pages to display in menu order. They will display the results output, but not in menuOrder. In the code I showed you before I was using : and in the second attempt I used the syntax you provided in your example. I have a special page configured to have the pwea-board-of-directors page as the parent.

(% searchresults tags="_pwea-board-of-directors_bod" words= order=-menuOrder %) did not work either. Nothing was displayed, no results.

I have the following in my special pages search for this display:
<div class="search-entry-bod-thumb"><?php if (return_special_field('thumb')=='') { echo 'Show'; }
else { echo '<img src="'; get_special_field('thumb');
echo '" />'; } ?></div>
<h5 class="search-entry-bod-title"><?php get_special_field('title','',true); ?></h5>
<?php get_special_field('designation'); ?><br />
<?php get_special_field('location'); ?><br />
<div class="search-entry-bod-email"><a href="mailto:<?php get_special_field('email','',false); ?>">
<?php get_special_field('email','',false); ?></a>&nbsp;&nbsp;&nbsp;
<?php get_special_field('phone'); ?>

</div>

<hr class="search-entry-bod-footer" />

<!--CSS-->
<style type="text/css">
.search-results { list-stype-type: none !important; }
.search-entry { margin-bottom: 5px; overflow: hidden; }
.search-entry-bod-thumb { display: block; float: left; margin: 0px 10px 5px 0px; padding: 5px; }
.search-entry-bod-title {padding: 0px; margin: 0px 0px 5px 0px; }
.search-entry-bod-email {}
.search-entry-bod-location {}
.search-entry-bod-phone {}
.search-entry-bod-footer {}
</style>

So is this a case of syntax errors on my part? I have the most recent of everything installed. I believe it's displaying in the creation order currently when calling menuOrder. The only other way I have successfully changed the order is url or reverse url.

Thank you for taking a look.
Reply
#4
(2013-10-01, 23:45:06)sarnaiz Wrote: I have tried (% searchresults tags="bod" order=+menuOrder %)
http://dev.pweaveanea.org/index.php?id=p...-directors

Are you sure that all your special pages HAVE a menu order? i.e. they have "add this page to menu" set and a "insert after" is specified? Alternatively check the XML files, if the tag menuOrder is set and different for all these special pages.

(2013-10-01, 23:45:06)sarnaiz Wrote: (% searchresults tags="_pwea-board-of-directors_bod" words= order=-menuOrder %) did not work either. Nothing was displayed, no results.

For displaying all pages below the directors page, you have to use tags="_parent_pwea-board-of-directors".
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#5
(2013-10-02, 01:06:06)mvlcek Wrote:
(2013-10-01, 23:45:06)sarnaiz Wrote: I have tried (% searchresults tags="bod" order=+menuOrder %)
http://dev.pweaveanea.org/index.php?id=p...-directors

Are you sure that all your special pages HAVE a menu order? i.e. they have "add this page to menu" set and a "insert after" is specified? Alternatively check the XML files, if the tag menuOrder is set and different for all these special pages.

(2013-10-01, 23:45:06)sarnaiz Wrote: (% searchresults tags="_pwea-board-of-directors_bod" words= order=-menuOrder %) did not work either. Nothing was displayed, no results.

For displaying all pages below the directors page, you have to use tags="_parent_pwea-board-of-directors".

http://dev.pweaveanea.org/index.php?id=p...-directors

I've gone back in and removed the parent page on the main config to allow for setting the page parent and adding to the menu on the special page. You can see that the menu order is correct in the nav, but not in the display of the results. So it's still not working as needed. I am using (% searchresults tags="_parent_pwea-board-of-directors" order=+menuOrder %) currently and getting the results you see. I don't need them in the menu in the sidebar though. I need them to display on the page correctly.

I thought the menu order was controlled by the menu order set in the navigation page where you can drag and drop pages and then save the order? So I must have misunderstood that. Could the menu order I am using in the Navigation Structure page be interfering with the menuOrder of the special page?
Reply
#6
Hi Martin,

I've now checked that each page is set to appear in menu and has a parent page of Board of Directors.

I have tried various permutations of the following code snippet in my page:
(% searchresults tags="_parent_pwea-board-of-directors" order="+menuOrder" %)
(% searchresults tags=_parent_pwea-board-of-directors order=+menuOrder %)
(% searchresults tags=bod order=+menuOrder %)
(% searchresults tags:bod order:-menuOrder %)
(% searchresults tags:"_parent_pwea-board-of-directors" order:"+menuOrder" %)
(% searchresults tags:_parent_pwea-board-of-directors order:+menuOrder %)

I am able to move the pages around and redo the order through the Edit Navigation Structure page and see those changes reflected correctly in the back end, but they do not display in the proper order (the menuOrder) on the page http://dev.pweaveanea.org/index.php?id=p...-directors

You can see from my screen capture that the menu order on the back end does not match the page display.
[attachment=282]

Thank you for your help with this!!
Reply




Users browsing this thread: 1 Guest(s)