Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
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 26th, 2011, 11:55 AM
dcutri dcutri is offline
 
Join Date: Nov 2010
Posts: 75
Default How do I make a category view for my sidebar that only includes one main category?

Eric, that's great. I have to hand it to you guys for such a top notch program. Can you help with this question? --> How do I make a category view for my sidebar that only includes one main category?

I need this:

<h2><a href="top-level-category-url">Sports</a></h2>
<ul>
<li><a href="sub-category-url">Football</a></li>
<li><a href="sub-category-url">Baseball</a></li>
</ul>

That's it, only one deep. And I don't want a context-based widget, just one that I can choose which main category (with children) to display. And only one, then I can put a bunch of them together on the same page if I want. I know there must be away to do this because I did it with the previous datafeedr version very easily. Thanks for any advice you can give.
  #2  
Old January 26th, 2011, 11:57 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Post moved to its own thread as per posting guidelines: http://www.datafeedr.com/forums/showthread.php?t=3603
  #3  
Old January 26th, 2011, 01:01 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

This will work where 517926 is the category ID for sports:

HTML Code:
[category.list before='<ul>' after='</ul>']
<?php if ($category->id == 517926 || $category->parent == 517926) { ?>
	<li>
		<a href="[category.link]" title="[category.name]">[category.name]</a>
		[category.repeat]
	</li>
<?php } ?>
[/category.list]
  #4  
Old January 26th, 2011, 01:40 PM
dcutri dcutri is offline
 
Join Date: Nov 2010
Posts: 75
Default

Thank you so much! My way was much longer and less efficient. lol. Once I understand how all this works I think their really is nothing I won't be able to do with this program. I'm pretty excited Thanks.
 


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


All times are GMT -5. The time now is 11:13 PM.


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