Support Forums

If no subcats

This is a discussion on If no subcats within the Customizations forums, part of the Developer Forums category; Hi, I am trying to change the browse page and i want to transform it into a accordion. I managed ...


Go Back   68 Classifieds Forums > Developer Forums > Customizations

Reply
 
Thread Tools Display Modes
Old 12-01-2009, 11:10 AM   #1
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 16
damiun is on a distinguished road
Default If no subcats

Hi,
I am trying to change the browse page and i want to transform it into a accordion.
I managed it so far but if i get to a subcat it still is the accordion.

So i would like to change that into making it a direct link,
But what is the code if the category has no subcats?

Dominick
damiun is offline   Reply With Quote
Old 12-01-2009, 11:12 AM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,126
Rep Power: 77
seymourjames is a jewel in the rough
Default

I memory serves me correctly it is

{if $showsubcat}
.
.
.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates and list your 68C site on ClassifiedCodes.com
seymourjames is offline   Reply With Quote
Old 12-01-2009, 11:16 AM   #3
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 16
damiun is on a distinguished road
Default

Thanks,

But i am looking for a code for within the section,
[quote]
{section name=tr loop=$data step=$cols}
{section name=td start=$smarty.section.tr.index loop=$smarty.section.tr.index+$cols}[/QUOTE}

I will send you a pm with username and password so you can see how i have it now.

Dominick
damiun is offline   Reply With Quote
Old 12-01-2009, 11:24 AM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,126
Rep Power: 77
seymourjames is a jewel in the rough
Default

Try looking at the code in the plugins folder. There are a few plugins there which may help you.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates and list your 68C site on ClassifiedCodes.com
seymourjames is offline   Reply With Quote
Old 12-01-2009, 11:46 AM   #5
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 16
damiun is on a distinguished road
Default

Hi,

see image to see what i have now,

I went throught the plugins but could find it because 2nd linking.

example:

Category - cars - fort, volkswagen, hyundai

But it the user is on the car page sees the fort, volkswagen and hyundai category.
But those categories (fort, volkswagen etc) havent got any subcats,
So the accordion is empty, so i want to make the accordion header into a direct link.

I tried the {if $showsubcat} code, but that doesnt work....
I debug the page and with the {$data} i found this:
Quote:
Array (11)
0 => Array (11)
id => "30"
parent_id => "5"
name => "Audio apparaten"
slug => "audio-apparaten"
description => ""
image => "templates/Damiun-template/images/fold..."
allowads => "Y"
cLink => ""
start_link => "<a href="rubrieken/audio-appar.html..."
subcats => ""
total => "0"
1 => Array (11)
id => "32"
parent_id => "5"
name => "DVD's"
slug => "dvds"
description => ""
image => "templates/Damiun-template/images/fold..."
allowads => "Y"
cLink => ""
start_link => "<a href="rubrieken/dvds.html" title..."
subcats => ""
total => "0"
And i need the code for determining if
Quote:
subcats => ""
is indeed empty.

So do i have to foreach it or something?
Attached Images
File Type: jpg subcats.jpg (77.5 KB, 2 views)
damiun is offline   Reply With Quote
Old 12-01-2009, 12:01 PM   #6
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 16
damiun is on a distinguished road
Default

I got one step further:

i've added

Quote:
{foreach from=$data item=entry}
{if $entry.subcats eq ''} no subcats {else} yes subcats {/if}
{/foreach}

Now it checks if the subcat is empty but it shows the result multiple times,
And now i am truely stuck.......
damiun is offline   Reply With Quote
Old 12-01-2009, 12:23 PM   #7
Customer
 
damiun's Avatar
 
Join Date: Apr 2009
Posts: 412
Rep Power: 16
damiun is on a distinguished road
Default

I found it,
For people who are also need it, the code is:

Quote:
{if $data[td].subcats eq ''}
damiun is offline   Reply With Quote
Old 12-01-2009, 01:20 PM   #8
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 3,126
Rep Power: 77
seymourjames is a jewel in the rough
Default

Looks good when I visited your site.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C, Version 4 Templates and list your 68C site on ClassifiedCodes.com
seymourjames is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I show more than 3 subcats on the frontpage? michael Technical Support 5 04-17-2007 03:15 PM
Adding Subcats to category page (Browse) garysr Templates, HTML, CSS, and Design Help 2 06-08-2006 12:50 PM


All times are GMT -4. The time now is 04:53 AM.


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