Thanks for your answer Fred.

Your example is slightly different than mine and easier to deal with.

In your example, the only missing part is the list of posts available at:
*http://domain.com/categories/:cat_id/posts*
You're right, this list is easy to implement and, providing that your posts
have a unique ID, a link to edit a post would link to
*http://domain.com/posts/:post_id/edit*
Then, the actions on a post are handled by the generator.
The same pattern applies for the comments.

Now, imagine you also have some tags to manage in your application.
Let's say a tag can be applied to many posts with a different weight each
time.
For example:
"post 1" has tags Programming (50%) and Design (50%)
"post 2" has tags Programming (20%) and Design (80%)
(Sorry for the stupid example, I just want to illustrate my problem.)

You have a generated module to manage tags here:
*http://domain.com/tags*

Then you want to list the tags of a post. You reuse the list developed to
display your posts and get it here:
*http://domain.com/posts/:post_id/tags*

So far, so good.

But in this page, you want the edit button to display a page where you can
edit the weight of a tag for the current post.
So you can't link to:
*http://domain.com/tags/:tag_id/edit*

Basically, you need an admin generator to work on the association between
Posts and Tags.

You can do it with the standard admin generator only if you give a unique ID
for each record in the association table (let's call it PostTag).
But you'll have to deal with URLs like this:
*http://domain.com/post-tags/:postTag_id/edit*

I would prefer URLs like this:
*http://domain.com/posts/:post_id/tags**/:tag_id/edit*

This requires to propagate the post_id in all links of the PostTag admin
module.
That's what I want to implement in my custom generator.
I think it gives better URLs, especially if you use slugs instead of ids.

Any comment on this possible enhancement ?
Is it useless ? Am I missing something ?

Thanks

Damien


2009/2/5 fredlab <[email protected]>

>
> Hey,
>
> This is a missing feature. What I am doing in the admin generator I am
> developping. Imagine a simple blog posts application. Posts are
> grouped by category. When I see the whole list of category, I can :
>
> * Get the list of post for that category by clicking on a get posts
> for that category button.
> * Then, from one post, I can click on a get comments for that post by
> clicking on a button.
>
> These 2 buttons are like the edit and delete button on each line of a
> list.
>
> This is a missing feature but it is not difficult to develop such a
> list and add it to you admin generator.
>
> Regards,
>
> Fredlab.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to