|
|
#1 |
|
68 Evangelist & Developer
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,605
Rep Power: 47 ![]() ![]() |
I'm sure that this is possible, but instead of having to re-invent the wheel I thought that I'd throw this out there.
Has anyone made different templates for specific categories? I have two top level categories that I have added a number of extra fields to (Vehicles and Real Estate). I hate the default look of having all of those extra categories just listed one after another in the view listing. I would assume that there must be a way to tell 68 classifieds something like: If listing type=10 (example ID) vehicle.tpl.php elseif listing type=14 (second example ID) realestate.tpl.php else viewlisting.tpl.php endif Obviously, I'm not a programmer ![]() Also, in order to make the specific templates for those categories, how do I call the specific extra fields separately to include them on the page where I would like to have them placed. The standard viewlisting.tpl.php file simply makes one call with a for each statement for ALL the extra fields. Thanks in advance for any help, suggestions, etc. -Mike IndianaPC.org
__________________
Mike-N-Tosh IndianaPC.org - A community website (v3.1.10 Developer - heavily modified) Sandbox (v3.1.10, v4.0.9, 4.1.3) Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,075
Rep Power: 117 ![]() |
Hi Mike,
I believe Juven14 created a module for this at one time but I am not sure if it still around. You may want to try and searching these forums for it. I believe it was built for v3.0. Also we do get this question a lot and for v4 I will see if I can't figure out a way of doing this.
__________________
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 | 68 @ Twitter | My Modules |
|
|
|
|
|
#3 |
|
Old Timer
Join Date: Oct 2006
Location: Denver, Colorado
Posts: 68
Rep Power: 13 ![]() |
This is something I would like to to, too. I'd like to have additional fields for automobile ads, so I'm guessing I need to add tables to the db, an alternate template so they can fill in those fields if they choose the auto category, and an alternate template for displaying all the fields in the ad.
BTW: I didn't find this topic in 3.0. I may have used the wrong search terms. I'll look again and post here if I find anything.
__________________
Thanks, Barbara v 3.1.5 Developer Get great deals in Denver and across the web, at Garage Sale Show.com |
|
|
|
|
|
#4 |
|
Moderator
|
I only made different templates for the store pages. The user could develop a template or the admin and the admin set it in the store table.
The way I would probably do it would be to set a field for the category like the category image, and then just have it determine the template from there.
__________________
John Snyder PHP Developer |
|
|
|
|
|
#5 | |
|
68 Evangelist & Developer
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,605
Rep Power: 47 ![]() ![]() |
Quote:
What it should have said is, ...listing all of the "extra fields" one after another. Making the "extra fields" is easy and is already built in to 68classifieds. (Admin/extra fields and attach to categories). What I'm trying to say is that when a user either browses or searches, they then get a list of ads (listings). If they click on the photo or the "more" link, then it shows the ad in the "viewlisting.tpl.php" template which shows it within the layout template. I can modify the "viewlisting.tpl.php" template which I have already done, BUT the "extra fields" are simply one call to see if there are extra fields and if yes, then display those too, one right after another. Also any changes in the viewlistin.tpl.php file is universal for ALL categories. What I'm saying is two fold. I want to have more than one viewlisting.tpl.php. In the viewlisting.php (where the link is going when the user is in browse or already searched), I want it to see if the category is one of the custom categories for which there is a separate template and if there is show the listing using that template instead of the default. I'm sure that it would work, but my biggest issue to resolve is how to get the individual "extra fields" in the custom layouts. -Mike
__________________
Mike-N-Tosh IndianaPC.org - A community website (v3.1.10 Developer - heavily modified) Sandbox (v3.1.10, v4.0.9, 4.1.3) Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
|
|
|
#6 |
|
Moderator
|
All you need to do is in viewlisting.php determine the section and then put an if or switch around it to display the viewlistings body template. I don't have access right now to my files but it would be something like this:
PHP Code:
{$extra.something} -- I can't remember exactly, but I've seen a thread lHotch made addressing this very issue.
__________________
John Snyder PHP Developer |
|
|
|
|
|
#7 |
|
68 Evangelist & Developer
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,605
Rep Power: 47 ![]() ![]() |
John,
Thanks, that's exactly what I was looking for. I'll search for the extra field calls that you referred too. -Mike When there's a will... There's upset relatives!!!
__________________
Mike-N-Tosh IndianaPC.org - A community website (v3.1.10 Developer - heavily modified) Sandbox (v3.1.10, v4.0.9, 4.1.3) Visit My blog for tips, tricks, tutorials, reviews for 68 Classifieds as well as my store with Templates, Mods & Docs Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
|
|
#8 |
|
Old Timer
Join Date: Oct 2006
Location: Denver, Colorado
Posts: 68
Rep Power: 13 ![]() |
Adding extra fields in the administration panel adds them for all categories. Would the extra fields for the custom template need to be entered into the db manually?
Your answer will take care of displaying the custom template with the extra fields, but to give the user the option to enter text into extra fields specific to that custom template, won't we have to put in a switch in the checkout process - like maybe in step1.tpl.php? Or am I looking in the wrong place?
__________________
Thanks, Barbara v 3.1.5 Developer Get great deals in Denver and across the web, at Garage Sale Show.com |
|
|
|
|
|
#9 | |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,075
Rep Power: 117 ![]() |
Quote:
__________________
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 | 68 @ Twitter | My Modules |
|
|
|
|
|
|
#10 |
|
Old Timer
Join Date: Oct 2006
Location: Denver, Colorado
Posts: 68
Rep Power: 13 ![]() |
Uh, okay. Duh. I should have looked at the extra fields before posting.
[head: meet desk]
__________________
Thanks, Barbara v 3.1.5 Developer Get great deals in Denver and across the web, at Garage Sale Show.com |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Smarty Templates and You. Posted BY Lhotch | Eric Barnes | HTML, CSS, and Design Help | 13 | 10-02-2007 08:06 AM |
| Free Template? | FlyingBee | HTML, CSS, and Design Help | 4 | 12-08-2006 10:17 AM |
| Sukaw Horse-Green Template | Syssh | v3.1 Questions & Support | 3 | 12-03-2006 12:47 PM |
| HTML Template | brian-bear | HTML, CSS, and Design Help | 7 | 10-12-2006 05:21 AM |
| Dreamweaver Template in 68classifieds | sporthorsebreeder | HTML, CSS, and Design Help | 3 | 04-23-2006 10:34 AM |