Support Forums

Old 06-08-2007, 11:57 AM   #1
Member
 
Join Date: Dec 2006
Posts: 96
Rep Power: 13
objelland is on a distinguished road
Default viewlisting.php

Hi guys

This thread is refering to my previous posted thread as you can find here:
http://www.68classifieds.com/forums/...5594#post15594

The thing is that the solution in the previous thread is at sub category level.
I would like to be able to determine which layout template to use at the top category level, and this should apply to all sub categories of that top level category.

As you can see from this uri, category.php?type=16&sec=41, the solution in the previous thread is to use the "sec=41" part to determine the layout template in viewlisting.php, but what I would really like is to use the "type=16" part for this job.

Does anyone know if this is possible in any way?

Thank's a lot for your feedback, it is really a great help.

Kind regards

Oyvind
objelland is offline   Reply With Quote
Old 06-08-2007, 12:57 PM   #2
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,693
Rep Power: 48
Mike-N-Tosh is just really niceMike-N-Tosh is just really nice
Default

objelland,

Unfortunately there hasn't been a discovered way to do that to date. In the thread I started a while back (which you've obviously already read to be where you are now), that is exactly what I was trying to achieve. Unfortunately, no one was able to come up with anything that would work in that fashion.

What I did to at least make it somewhat easier in the viewlisting.php code was to add all of the subcategory id's to one layout.tpl.php file like this (based on suzkaw's suggestion):

PHP Code:
                case 25:
                case 
26:
                case 
27:
                case 
70:
                case 
71:
                case 
72:                
                    
$class_tpl->assign('body','yourcustomlayout.tpl.php'); 
I know that's not perfect, but it at least saves some time.

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified)
Sandbox (v3.1.10, v4.0.9, 4.1.5)
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
Mike-N-Tosh is offline   Reply With Quote
Old 06-08-2007, 08:18 PM   #3
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,224
Rep Power: 62
juven14 is a jewel in the rough
Default

You are confusing me. The link from category.php shouldn't be doing anything to the listing. The listing url is viewlisting.php?view=. In viewlisting you would have to use the section for which it is placed unless you do a lookup to find that category's parent.

Now in category.php it shows the showlisting.tpl.php template. It is the file that would utilize the url with sec & type.

Which template are your trying to change, and coming from what page. I just want to be on the same page.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewlisting.tpl.php objelland v3.1 Modules & Modifications 7 08-07-2007 05:14 PM
I need a little help please darek v3.1 Modules & Modifications 6 04-06-2007 09:28 AM
How do I add something to the universal <head? (I want a new javascript declaration) mike41 v3.1 Questions & Support 6 11-18-2006 09:26 AM


All times are GMT -4. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0