- Posts: 7
- Thank you received: 0
I am using the Tables component for a members directory.
Could you give me a hint on how I could add an alphabetic type index, like the way that pagination works. something like this:
"A..B..C..D..E..F.......Z"
And each letter would be clickable and bring up last names that start with that letter.
I would be glad to modify CSS and even some code if needed, I just need a push in the right direction.
Please Log in or Create an account to join the conversation.
After some searching and trial and error, I found that I can create a link that will do an advanced search on the table, like this:
"index.php?option=com_grid&view=view&gid=3&aso=begins&data_search=memberlast_no_mid|B"
That link will display all the "Memberlast_no_mid" entries that begin with the letter "B", so I think I'm on my way.
Is there a way to add a "reset form button"?
Thanks
Please Log in or Create an account to join the conversation.
I'm hoping I can get some assistance getting this code inserted into the "GridView.php" file...
I would like to have the Alphabetic Pagination placed on top of the grid, so I assume I would insert it right at the end of the "Header and Search Menu Layout"
Here is my HTML code that works to change the page:
<a href="?option=com_grid&view=view&gid=3&aso=begins&data_search=memberlast_no_mid|B" class="pageNum">B</a></td><td style="border:none;margin:0px;padding:0px;width: 1.5em ;text-align:center;padding:0px 1px 0px 1px;">
<a href="?option=com_grid&view=view&gid=3&aso=begins&data_search=memberlast_no_mid|C" class="pageNum">C</a></td><td style="border:none;margin:0px;padding:0px;width: 1.5em ;text-align:center;padding:0px 1px 0px 1px;">
$field['output_script'] .= "<td style=\"border:none;margin:0px;padding:0px;width: 1.5em ;text-align:center;padding:0px 1px 0px 1px;\">";
$field['output_script'] .= "<a href=\"javascript:;\" onclick=\"searchjx('".$this->ajaxURL("", "", $i)."', '$this->_ID');\" class=\"currentPageNum\" >";
$field['output_script'] .= "<b>".($i+1)."</b>";
$field['output_script'] .= "</a></td>";
Please Log in or Create an account to join the conversation.
Much more specifically:
how to get this:
$title.= "<a href=\"javascript:;\" onclick=\"searchjx('".$this->ajaxURL("", "", $i)."', '$this->_ID');\" class=\"currentPageNum\" >";
<a href="?option=com_grid&view=view&gid=3&aso=begins&data_search=memberlast_no_mid|C"
Please Log in or Create an account to join the conversation.
I've placed this:
foreach(range('A','Z') as $letter)
{
$title.= "<td style=\"border:none;margin:0px;padding:0px;width: 1.5em ;text-align:center;padding:0px 1px 0px 1px;\">";
$title.= "<a href=\"?option=com_grid&view=view&gid=3&aso=begins&data_search=memberlast_no_mid|".$letter."\"class=\"currentPageNum\">";
$title.= "<b>".$letter."</b>";
$title.= "</a></td>";
}
Please Log in or Create an account to join the conversation.