Support Forums

Custom ad spots

This is a discussion on Custom ad spots within the Templates, HTML, CSS, and Design Help forums, part of the General category; Hey guys and girls, I need a bit of help eyes starting to bug me been looking at code for ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 08-03-2008, 04:50 PM   #1
Junior Member
 
Join Date: Jun 2008
Posts: 15
Rep Power: 7
roamex is on a distinguished road
Default Custom ad spots

Hey guys and girls,

I need a bit of help eyes starting to bug me been looking at code for hours and im still a noob at all this. I am trying to create a custom spot at the bottom of my page under the listings (showlistings.tpl). I need help finding how to check what category or sub category i am under. i have included a demo of the code im trying to do below the Unknownvarible is what i need help with. I just need to check what the current sub category i am in.

example if i am in automotive >> Cars i need to know that im in Cars and don't need to know any of the higher level categories only current.


{if Unknownvarible == "AUTOMOTIVE"}

<p>testing car ad works</p>

{elseif Unknownvarible == "Atv"}

<p>testing for Atv works</p>

{elseif Unknownvarible == "Cars"}

<p>testing for AUTOMOTIVE works</p>

{else}

<p>Test failed</p>

{/if}

anyway thank you.
roamex is offline   Reply With Quote
Old 08-04-2008, 11:15 AM   #2
Junior Member
 
Join Date: Jun 2008
Posts: 15
Rep Power: 7
roamex is on a distinguished road
Exclamation help help help

is there anyone out there that has any idea of how this is done????

I am just trying to add a check in the showlistings.tpl file that tells me what category the user is currently in so I can add custom ads based of those categories.

If anyone needs any more information please just ask really lost here.
roamex is offline   Reply With Quote
Old 08-04-2008, 11:43 AM   #3
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,262
Rep Power: 124
Eric Barnes is a jewel in the rough
Default

Hi,

I think you want something like this:

Code:
{if $smarty.get.cat == "AUTMOTIVE"}
<p>testing car ad works</p>
{elseif $smarty.get.cat == "Atv"}
<p>testing for Atv works</p>
{elseif $smarty.get.cat == "Cars"}
<p>testing for AUTOMOTIVE works</p>
{else}
<p>Test failed</p>
{/if}
The $smarty.get.cat will be the same as the category slug or:
category.php?cat=cars
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 08-04-2008, 12:08 PM   #4
Junior Member
 
Join Date: Jun 2008
Posts: 15
Rep Power: 7
roamex is on a distinguished road
Default perfect

Thanks alot for some reason that was getting in my way thanks.
roamex is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Active defaults" for custom fields cheesegrits Technical Support 1 01-29-2008 07:17 PM
State menu as custom field cheesegrits Technical Support 5 01-24-2008 05:31 PM
Where is the custom field search function? MrSpandex v3.1 Modules & Modifications 3 12-08-2006 07:33 PM
Custom Payment Mod pruffin v3.1 Questions & Support 0 12-06-2006 01:34 AM
Custom Payment Provider? flyingpylon v3.1 Questions & Support 4 10-31-2006 04:49 PM


All times are GMT -4. The time now is 08:42 AM.


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