|
|
#1 |
|
Senior Member
Join Date: Sep 2006
Posts: 226
Rep Power: 15 ![]() |
Can anyone explain the php needed to make the top buttons stay on there 'active' state once clicked?
I've found a few scripts but they won't seem to work because of all the variables after the category.php e.g. i've now got a custom button at the top linked to category.php?cat=charities so i'd like the button to stay in the active/hover state when it's clicked. as always any help appreciated.
__________________
V4.0.9 Developer Last edited by Tim_A; 08-09-2007 at 05:06 AM. |
|
|
|
|
|
#2 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,700
Rep Power: 109 ![]() |
You could do some thing like this:
Code:
<a href="#" {if $smarty.get.cat == 'charities'}class="active"{/if}></a>
__________________
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 |
|
Senior Member
Join Date: Sep 2006
Posts: 226
Rep Power: 15 ![]() |
Thanks Eric...
that works, but.... (there's always a but with me!!) it won't work if you go into child categories. Is there a solution? Cheers
__________________
V4.0.9 Developer |
|
|
|
|
|
#4 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,700
Rep Power: 109 ![]() |
How many sub categories do you have? You could always list out each one in the if statement:
Code:
{if $smarty.get.cat == 'charities' || $smarty.get.cat =='charitiessubcat'}
__________________
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 |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Sep 2006
Posts: 226
Rep Power: 15 ![]() |
over 25 in some places
![]() i've worked out how to do it for my pages which end in .php
__________________
V4.0.9 Developer |
|
|
|
|
|
#6 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,700
Rep Power: 109 ![]() |
Will you post how you are doing it with the php pages and maybe that give me a better idea.
__________________
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 |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Sep 2006
Posts: 226
Rep Power: 15 ![]() |
At the top of the .php page i've got this:
PHP Code:
PHP Code:
__________________
V4.0.9 Developer |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,282
Rep Power: 37 ![]() ![]() |
Can you just make an "a:link, hover, active" the same in your stylesheet?
Just a thought, -Mike
__________________
Mike-N-Tosh v3.1.10 Developer IndianaPC.org - A community website Sandbox v4.0.9, 4.1 Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds. Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
|
|
|
|
#9 | |
|
Staff
Join Date: Mar 2006
Posts: 395
Rep Power: 20 ![]() |
Quote:
PHP Code:
|
|
|
|
|
|
|
#10 |
|
68 Classifieds Staff
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,700
Rep Power: 109 ![]() |
Mike.
Try this. Open the category.php file and below the require_once statements add this function: PHP Code:
PHP Code:
{if $parent == 1} change 1 to the actual parent id.
__________________
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 |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Selecting a default State | manilaboy | v3.1 Questions & Support | 2 | 10-17-2006 12:40 PM |
| Wrong status (active, inactive) for renewed ads with options | pat01 | v3.1 Questions & Support | 0 | 07-29-2006 04:05 AM |
| Ads Listed By State | garysmith | v3.0 Questions & Support | 10 | 04-25-2006 05:50 PM |
| State field | quickbiz | v3.0 Questions & Support | 6 | 04-25-2006 12:03 PM |
| Memberships - not active | Chaslie | v3.1 Questions & Support | 4 | 04-11-2006 08:57 PM |