ok here is my problem i'm new to cake and i bulid every thing ok so i have
categories and recipes categories has many   recipes , recipes belongs to
categories  i wanna access recipes by categories 
this for my public website 
what code should i put in order to access it by link and shows the recipes
in that categories 

this is my categories table strucature 
Id 
Name 
Area 
Slug =>this one i made it so it can act as slug 
Active 


this my categories "index" 


a<?php $paginator->options(array('url' => $this->passedArgs)); ?>
<table cellpadding="0" cellspacing="0">
<tr id="categoriesSorting">

</tr>
<?php
$i = 0;
foreach ($categories as $category):
        $class = null;
        if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
        }
?>
        <tr<?php echo $class;?>>
        
        
<?=$html->link('<h3>'.$category['Category']['name'].'</h3>','/categories/view/'.$category['Category']
        ['slug'],null,null,false);?>



<?php endforeach; ?>
</table>
<div class="paging" id="categoriesPaging">
        <?php echo $paginator->prev('<< '.__('previous', true), array(), null,
array('class'=>'disabled'));?>
 |      <?php echo $paginator->numbers();?>
        <?php echo $paginator->next(__('next', true).' >>', array(), null,
array('class'=>'disabled'));?>
</div>


and this is my "view"

<h2><?php  __('Recipes By Category');?></h2>

<br       />                            
                         <table>    
                                
                        
<?=$html->link('<h3>'.$category['Category']['name'].'</h3>','/recipes/view/'.$category['Category']
        ['slug'],null,null,false);?>
                                


        
                                        
                                                </table>
                </div>
                
                <div class="clear"> </div>
                
        </div>
        
        </div> 
 
<script type="text/javascript"> 
  $("#tabpanel > ul").tabs();
</script>


and one more thing 
when i click on categories lets say "new" it takes me to the view u know
then i can see the link 
-- 
View this message in context: 
http://www.nabble.com/help-plz-tp21814971p21814971.html
Sent from the CakePHP mailing list archive at Nabble.com.

.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to