Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Would like to view my groups(index page) in alphabetical order by default

12 years 1 month ago
  • Arthur's Avatar
    Topic Author
  • Arthur
  • Offline
  • Fresh Boarder
  • Posts: 70
  • Thank you received: 7
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired

I'm using my groups like a venue directory. I would like to the default display to be alpha instead of most recent. How can I change this?

awesomescreenshot.com/08e3ey9c37

12 years 1 month ago
Licenses:

Hi Arthur,

you can do it by using override for /components/com_community/templates/default/groups.list.php
documentation.jomsocial.com/wiki/Customizing_Template
and put this code at the bottom of page:

<script type="text/javascript">
joms.jQuery(document).ready(function() {
	var sort = "<?php if (isset($_GET['sort'])) echo $_GET['sort']; else echo '';?>";
	if (sort == '') window.location.href = joms.jQuery(joms.jQuery('ul.filters li.filter a')[1]).attr('href');
});
</script>

Regards,
Albert

12 years 1 month ago
  • Arthur's Avatar
    Topic Author
  • Arthur
  • Offline
  • Fresh Boarder
  • Posts: 70
  • Thank you received: 7
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired

Do you mind taking a look at the page? It is working, but its working after it has went through the code. When on the page, first time it loads it the default way. Then after a sec or two it goes in the alphabetical. Is it anyway to just make it appear that way on first load or no? It looks very odd when it does that.

www.picturemeclubbing.com/whiteparty/index.php/places

12 years 1 month ago
Licenses:

Hi Arthur,

my prev post, that changes will not disappear at upgrade process. But here the other solution, but will disappear at upgrade process.
1. edit components/com_community/views/groups/view.html.php
2 change the code line 1447
from

$sorted = $jinput->get->get('sort', 'latest', 'STRING');
to
$sorted = $jinput->get->get('sort', 'alphabetical', 'STRING');
3 change the code line 1485
from
->set('sortings', CFilterBar::getHTML(CRoute::getURI(), $sortItems, 'latest'))
to
->set('sortings', CFilterBar::getHTML(CRoute::getURI(), $sortItems, 'alphabetical'))

Regards,
Albert

12 years 1 month ago
  • Arthur's Avatar
    Topic Author
  • Arthur
  • Offline
  • Fresh Boarder
  • Posts: 70
  • Thank you received: 7
Licenses:
JomSocial Expired AdAgency Expired iSEO Expired

That did the trick. Just so I'm clear.., doing an override in this case won't work?

12 years 1 month ago
Licenses:

Hi Arthur,

override won't work for views. override only for templates.

Regards,
Albert

The following user(s) said Thank You: Arthur
12 years 4 weeks ago
Licenses:

Hi Arthur,

We have not received any response back from you in over 7 days, and would like to know if you consider this issue to be resolved. If you have any further questions, simply reply to this post.

Regards,
Albert

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW