i have a question about kohana 2:
I need to create a temporary field on every find(), called ‘slug’. This field will have a dynamically created “SEO friendly” url of current record.
For example, the site adress is http://www.domain.com and i want to view a post with id 6 called “This is an example title”. The desired slug will be: 1-this-is-an-example-title
I don’t want to generate the slug directly in view by echoing $post->id . '-' . url::title($post->title). What i want to achieve is an ability to echo a dynamically created variable $post->slug which will not be presented in database, it’ll just be generated in a model.
I hope you understand me well ?
Can you provide me any ideas or code samples please?
Big thanks,
Mike
1 Answer