# |
Aug 7th 2008, 23:05 |
freebox |
sorry |
# |
Aug 7th 2008, 23:05 |
markstory |
fail :) |
# |
Aug 7th 2008, 23:05 |
freebox |
haha |
# |
Aug 7th 2008, 23:05 |
freebox |
function view($id = null) { if (!$slug) { |
# |
Aug 7th 2008, 23:04 |
t73net |
there you go, someone with more exp than me and slug behaviour |
# |
Aug 7th 2008, 23:04 |
freebox |
my bad |
# |
Aug 7th 2008, 23:04 |
freebox |
sorry |
# |
Aug 7th 2008, 23:04 |
freebox |
lol |
# |
Aug 7th 2008, 23:04 |
markstory |
bin your controller |
# |
Aug 7th 2008, 23:04 |
freebox |
yes |
# |
Aug 7th 2008, 23:04 |
markstory |
function view($slug = null) ? |
# |
Aug 7th 2008, 23:04 |
t73net |
I use a simple beforeSave() and slug my column, which I usually call nice name |
# |
Aug 7th 2008, 23:04 |
freebox |
but i get this: Notice (8): Undefined variable: slug [APP\controllers\piadas_controller.php, line 17] |
# |
Aug 7th 2008, 23:03 |
markstory |
or something like that? |
# |
Aug 7th 2008, 23:03 |
freebox |
yes |
# |
Aug 7th 2008, 23:03 |
freebox |
in my model i have var $actsAs = array('Sluggable' => array('label' => 'nome', 'separator' => '-', 'overwrite' => false)); |
# |
Aug 7th 2008, 23:03 |
markstory |
are you doing findBySlug? |
# |
Aug 7th 2008, 23:03 |
freebox |
the url looks good, the slug field is filled |
# |
Aug 7th 2008, 23:03 |
t73net |
yeah I looked at it before |
# |
Aug 7th 2008, 23:03 |
freebox |
in my view i have: <?php echo $html->link($piada['Piada']['titulo'], array('action'=>'view', $piada['Piada']['slug'])); ?> |
# |
Aug 7th 2008, 23:03 |
t73net |
I don't know much about the sluggable behaviour, sorry |
# |
Aug 7th 2008, 23:02 |
freebox |
i'm following the "tutorial" http://bakery.cakephp.org/articles/view/slug-behavior |
# |
Aug 7th 2008, 23:02 |
t73net |
hrrm |
# |
Aug 7th 2008, 23:02 |
freebox |
no |
# |
Aug 7th 2008, 23:02 |
t73net |
so it's an app wide var then ? |
# |
Aug 7th 2008, 23:02 |
freebox |
=) |
# |
Aug 7th 2008, 23:02 |
t73net |
Ahh ok |
# |
Aug 7th 2008, 23:01 |
freebox |
sluggable behavior |
# |
Aug 7th 2008, 23:01 |
t73net |
) |
# |
Aug 7th 2008, 23:01 |
t73net |
freebox what does $slug == to ? |
# |
Aug 7th 2008, 23:00 |
freebox |
what can be wrong? |
# |
Aug 7th 2008, 23:00 |
freebox |
when i try to access domain.com/piadas/view/the-slug |
# |
Aug 7th 2008, 23:00 |
t73net |
i18n is internationalization |
# |
Aug 7th 2008, 23:00 |
freebox |
my app alway enter in this if: if (!$slug) { |
# |
Aug 7th 2008, 23:00 |
camilleb |
can i use p28n and i28n at the same time ? |
# |
Aug 7th 2008, 23:00 |
t73net |
I got that all screwed around |
# |
Aug 7th 2008, 23:00 |
t73net |
l10n is localization |
# |
Aug 7th 2008, 23:00 |
freebox |
lol :/ |
# |
Aug 7th 2008, 22:59 |
camilleb |
thanks :p |
# |
Aug 7th 2008, 22:59 |
t73net |
or i10n |
# |
Aug 7th 2008, 22:59 |
t73net |
internationalization == i 10 letters n |