Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Joomla! 1.5 Extension Development
  • Table Of Contents Toc
Learning Joomla! 1.5 Extension Development

Learning Joomla! 1.5 Extension Development - Second Edition

close
close
Learning Joomla! 1.5 Extension Development

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (14 chapters)
close
close
13
Index

Setting ordering

Several of Joomla!'s core components allow you to order records in a list by clicking on arrows in the Ordering column. We can accomplish the same by using Joomla!'s JPagination class, and the move() member function of JTable. Before doing this, we should start displaying the records in the correct order. Make the highlighted adjustment to the query in the /administrator/components/com_critic/views/critics/view.html.php file:

$db =& JFactory::getDBO();
$db->setQuery('SELECT * FROM #__critic ORDER BY ordering');

$rows = $db->loadObjectList();

Save the file, and then reload /administrator/index.php?option=com_critic in the browser. Your screen should now have the records sorted by the Ordering column and should look similar to the following:

Setting orderingelements generating, JHTML usedaccess, setting

Next, we need to bring in the JPagination class that will help us generate the up and down arrows on the list screen. Again, in the views/critics/view.html.php file, add the following highlighted code:

...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Joomla! 1.5 Extension Development
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon