This is a discussion on Adding a Heading to the Featured Listings within the HTML, CSS, and Design Help forums, part of the General category; Hello I want to include a heading for the Featured Listings that show on my home page in the same ...
|
|||||||
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello
I want to include a heading for the Featured Listings that show on my home page in the same way that the Browse Categories section has a heading on the home page. Can anyone tell me how to do this? Thanks for any help. Hugh |
|
#2
|
||||
|
||||
|
I beleive the featured listings plugin builds its own table, the plugin is in includes/template/plugins and is called function.featured_listings_horizontal.php.
At approx line 98 you have the line that assignst the start table tag and the values passed to the function from the template to the variable called $output and it looks like this. PHP Code:
PHP Code:
Another, perhaps easier method would be in layout.tpl.php, just above where the function is called. Simply create a new table with your header above the function and get ride of the line break above where the function is currently called. This may give you the desired result, youd have to try it and see.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#3
|
|||
|
|||
|
Hello Lhotch
Thanks for your reply. I added add another line with the table header info and appended it to the current value of $output and this did the trick. Well almost. The background of the header does not go all the way across as it does in the Browse Categories section. Can you tell me how to extend the background of the heading all the way across the table? Sorry about the basic question but I am new to PHP. Cheers Hugh |
|
#4
|
||||
|
||||
|
Quote:
The number you specify to span should equal how many table data cells you have. So if your table has 3 cells then do this.... HTML Code:
$output.="<tr><th colspan="3">Your table title here</th></tr>";
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#5
|
|||
|
|||
|
Quote:
I am not sure where to look to find out how many cells the table has. I looked in the function.feature_listings_horizontal.php file and found that the table had 4 cols and 3 rows so I guessed 7. I entered the code $output.="<tr><th colspan="7">Featured Listings</th></tr>"; in line 99 and I received the following error when I tried to view my home page. Parse error: parse error, unexpected T_LNUMBER in C:\Websites\tbdiaries\includes\template\plugins\fu nction.feature_listings_horizontal.php on line 99 Any idea where I am going wrong? Cheers Hugh |
|
#6
|
||||
|
||||
|
Hugh,
How about this? Change the function file back to the way it was. Next open the layout.tpl.php file and locate the {function_feature_listings} Change it to this: HTML Code:
<table class="tborder"> <tr> <th>Featured Listings</th> </tr> <tr> <td> {function_feature_listings original code here} </td> </tr> </table>
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#7
|
||||
|
||||
|
Quote:
PHP Code:
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#8
|
|||
|
|||
|
My thanks to Larry and Eric
That's it working now I used Larry's method. It worked fine with escaping the double quotes around the number 7 $output.="<tr><th colspan=\"7\">Featured Listings</th></tr>"; Thanks for all your help. Cheers Lads Hugh |
|
#9
|
||||
|
||||
|
Glad you got it working.
__________________
Eric Barnes 68 Classifieds Developer Please do not send me a private message asking for support. Instead use these open forums or our ticket system. Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | Twitter |
|
#10
|
|||
|
|||
|
Hey Ya'll -
This worked for me except I found this code in home.tpl.php - not layout.tpl.php Quote:
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Smarty Variables for Featured Listings? | bgordon | v3.1 Questions & Support | 7 | 09-12-2006 01:50 PM |
| Featured Listings | versatility | v3.1 Questions & Support | 1 | 08-09-2006 12:43 PM |
| Adding a heading to the Featured Listings | sporthorsebreeder | v3.1 Questions & Support | 2 | 07-21-2006 01:04 PM |
| Adding a heading to the Featured Listings | sporthorsebreeder | v3.0 Questions & Support | 1 | 07-21-2006 12:49 PM |
| adding link to featured listings text | NJHomeGuide | v3.0 Questions & Support | 0 | 05-07-2006 04:21 PM |