Custom ad spots

This is a discussion on Custom ad spots within the 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 > HTML, CSS, and Design Help

 
LinkBack Thread Tools Display Modes
  #1  
Old 08-03-2008, 03:50 PM
Junior Member
 
Join Date: Jun 2008
Posts: 13
Rep Power: 2
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.
Reply With Quote
  #2  
Old 08-04-2008, 10:15 AM
Junior Member
 
Join Date: Jun 2008
Posts: 13
Rep Power: 2
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.
Reply With Quote
  #3  
Old 08-04-2008, 10:43 AM
68 Classifieds Staff
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,003
Rep Power: 92
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
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 | Submit a Ticket | Twitter
Reply With Quote
  #4  
Old 08-04-2008, 11:08 AM
Junior Member
 
Join Date: Jun 2008
Posts: 13
Rep Power: 2
Default perfect

Thanks alot for some reason that was getting in my way thanks.
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
"Active defaults" for custom fields cheesegrits v4 Questions & Support 1 01-29-2008 06:17 PM
State menu as custom field cheesegrits v4 Questions & Support 5 01-24-2008 04:31 PM
Where is the custom field search function? MrSpandex v3.1 Modules & Modifications 3 12-08-2006 06:33 PM
Custom Payment Mod pruffin v3.1 Questions & Support 0 12-06-2006 12:34 AM
Custom Payment Provider? flyingpylon v3.1 Questions & Support 4 10-31-2006 03:49 PM


All times are GMT -4. The time now is 01:28 PM.


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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22