Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Problems
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 13th, 2012, 11:30 AM
anmihe anmihe is offline
 
Join Date: Jan 2012
Posts: 13
Default Weird PHP listing problem with the category view!

Hey guys,

So I'm using a slightly modified version of a code I saw in another thread to customize the category listing in my category view, this is what I got:
HTML Code:
<h3>Category by Type</h3>
<ul>
[category.list]
<?php if ($category->id == 720848 || $category->parent == 720848) { ?>
  <li class="cid-[category.id]">
    <a href="[category.link]" title="[category.name]">[category.name]</a>
    [category.repeat]
  </li>
<?php } ?>
[/category.list]
</ul>

<h3>Category by Strength</h3>
<ul>
[category.list]
<?php if ($category->id == 720849 || $category->parent == 720849) { ?>
  <li class="cid-[category.id]">
    <a href="[category.link]" title="[category.name]">[category.name]</a>
    [category.repeat]
  </li>
<?php } ?>
[/category.list]
</ul>
Thing is, it shows the same category tree for both "category loops", and it all deepens on which I have on the top, for the above example it shows the 720848 category and its children in both lists , but if I switch places both show the 720849 category and children.

...is it some query that needs to be reset or something maybe!? Or am I just missing something here?

Thanks in advance!
  #2  
Old January 13th, 2012, 11:43 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

I think you need to separate the 2 loops into 2 different Category list modules. They shouldn't be in the same module.

Eric
  #3  
Old January 13th, 2012, 11:51 AM
anmihe anmihe is offline
 
Join Date: Jan 2012
Posts: 13
Default

Ahhh, I knew I should have tried that myself!

Thanks a lot works fine now!
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
View Buy Now button in Category Listing venus Problems 4 October 5th, 2011 05:31 PM
Problem with custom category view layout charlesk Problems 2 July 24th, 2011 09:18 PM
Weird Category problem macfink Problems 1 May 22nd, 2011 10:43 AM


All times are GMT -5. The time now is 03:53 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.