Visual guides to Joomla
- Setting up a MYSQL database for Joomla
- Customising a Joomla weblinks page
Customising Joomla weblinks - page 3
Next we're going to remove the Display # and drop-down menu as shown on the left.
The code for this is in the same file, at the top of the listing.
Here are the lines to look for . . .
<script type="text/javascript">
function tableOrdering(order, dir, task) {
var form = document.adminForm;
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
document.adminForm.submit(task);
}
</script>
<div class="display">
<form action="<?php echo htmlspecialchars($this->action); ?>" method="post" name="adminForm">
<?php echo JText :: _('Display Num'); ?>
<?php echo $this->pagination->getLimitBox(); ?>
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order'] ?>" />
<input type="hidden" name="filter_order_Dir" value="" />
</form>
</div>
There are two things here. The first is a Javascript that is used to sort a table, we are not going to need that. Second is the code that displays the number of items in a drop-down. Commenting out these two parts calls for two different methods. There is html and php code to be removed. Of course you could just remove them altogether, but that means that anyone who comes after you will not know what you did. AND - a couple of months in the future you will have forgotten too, so if you comment them out and add a suitable additional comment to say what you did then you will remember it too.
Use html comment (<-- before the items, --> after it) to remove the html and then inside that you still need to comment out the php with //.
Here's the finished result . . .
<!--<script type="text/javascript">
function tableOrdering(order, dir, task) {
var form = document.adminForm;
form.filter_order.value = order;
form.filter_order_Dir.value = dir;
document.adminForm.submit(task);
}
</script>
-->
<!--<div class="display">
<form action="<?php //echo htmlspecialchars($this->action); ?>" method="post" name="adminForm">
<?php //echo JText :: _('Display Num'); ?>
<?php //echo $this->pagination->getLimitBox(); ?>
<input type="hidden" name="filter_order" value="<?php //echo $this->lists['order'] ?>" />
<input type="hidden" name="filter_order_Dir" value="" />
</form>
</div>-->
As before, upload the cusomised file and check that the page of weblinks displays without the appropriate items.
That's it.

