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 ...
|
|||||||
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
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. |
|
#3
|
||||
|
||||
|
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}
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 |
|
#4
|
|||
|
|||
|
Thanks alot for some reason that was getting in my way thanks.
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |