Jump to content

Hello A-Z Help

Recommended Posts

Hello everyone im new here and im very happy that i found smth good here (just a think).

im trying to create alphabetic power search module for joomla 


my web test is this ->http://vps365826.ovh.net/index.php/africa as you can see the alhabetic line

( A B C D E G I K L M N R S T U Z ) as you see some words missing well thats cause i dont have articles with words ex (F) photo ex. ( http://prntscr.com/e9j9iu )

well i want to create it with all alphabetic words even if we dont have article with that word 

i've created with my friend that code 

<div class="ordered">
                $db = JFactory::getDBO();
                $query = 'SELECT count(*) as nm, SUBSTR(title,1,1) as alpha FROM #__content WHERE catid = '.$catid.' GROUP BY SUBSTR(title,1,1)';
                $mostIng = $db->loadObjectList();
                foreach ($mostIng as $row) {
                    echo '<li data-text="'.$row->alpha.'">'.$row->alpha.' '.'</li>';

but i want it somethink like that 

<div class="ordered">
    		<li class="orderedLabel closed">Αναζήτηση αλφαβητικά ></li>

well thanks for your time and sorry for my bad english im trying to learing btw thank you very much!!!

Share this post

Link to post
Share on other sites


foreach (range('A','Z') as $alpha) {
    echo "<li data-text='$alpha'>$alpha</li>\n";

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.