Closed bryanburgers closed 10 years ago
You can use getMeta:
if ($any->isValidCategoryUrlTitle()) {
$cat_id = $any->getMeta('cat_id');
Ah, good deal! Any idea when getMeta
will show up in an official release? For ease of maintenance among my team, we try to only use released versions of add-ons.
I downloaded 1.0.5 today and I get a 'undefined method getMeta' error.
Thanks!
Is there any way to get the category ID within a callback after a valid Category URL Title is found? I realize I can use
{route_X_cat_id}
. But I'd like to set it to my own variable.While
{route_X_cat_id}
works, I don't want to, within my template, depend on the fact that the:any
is the first wildcard in my routes. If I change that to:page:3/:any/:pagination
in the future, then I need to go into my template and change{route_1_cat_id}
to{route_2_cat_id}
.