Hey all,

So, I just downloaded symfony and decided to try and learn it by
following the Jobeet tutorial. After some bumps and starts (not sure
if the symfony website maintainers read this, but they might think of
including a specialized install guide for Snow Leopard, took me
forever and a ton of googling to get everything set up right), I've
made it to Day 5. Everything works fine until i try to use the slugify
methods. I'm following the tutorial completely, but I am setting up a
news site instead of a job site, so I'll be referencing a "job" as an
"article." So, I went into lib/model/doctrine/Article.class.php and
created the function getTitleSlug() as described in the tutorial. I
then created the lib/Article.class.php Article class with static
public function slugify. Now comes the problem. If I leave my
article_show_user method as such:

article_show_user:
  url: /article/:title_slug

I get an error when viewing the index that says: The "/
article/:title_slug" route has some missing mandatory parameters
(:title_slug).

However, when I remove the _slug part (so it just says "url: /
article/:title") everything works fine, but obviously I'm not getting
what I want: slugified titles!

I created one article (where the title was: "A Test Featured
Article"). If I enter "article/a-test-featured-article" as the test
url, I get the correct page...so, I'm confused how this is working on
the show article itself but NOT the index. If it helps any, here's the
code I'm using for my indexSuccess.php:

<h1>Articles</h1>

<div class="article_list">
  <?php foreach ($articles as $article): ?>
    <div class="article">
      <?php echo link_to($article->getTitle(), 'article_show_user',
$article) ?>
    </div>
  <?php endforeach; ?>
</div>

<a href="<?php echo url_for('article/new') ?>">New</a>


Any help is greatly appreciated!!!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to