Ammendum: Derek's suggestion seems much more suitable! Thanks for that Derek, I'll look at this module too!!
My origional answer (that I never finished typing)
Its possible, but you'll need to do alot of core and CP hackery to achieve this, the function url_title
is in the file `/system/expressionengine/helpers/url_helper.php Line 474 on EE 2.10.1 if your interested. Be wary changing this function though, other diveses and modules use this common function, you'd be better re-implimenting it for the one place you want it.
Also the logic in the CP is not suitable, the current version works as url_title derives from title, so once title field is updated and url_title is blank then update. With your construct there would need to be code that redefines this logic so that if either field is updated and rul_title is blank or matches one or the other fields but not both then.... you see waht I mean???
An Alternative
Could you not handle this another way? Lets say you have a template set up with the route of /resturants/{any}
so would pick up the URL /resturants/pepperoni_pizza-luigis_smoke_house. Now lets say you split the 2 fields (lets say
url_titlefor the Luigi part and
food` as the pizza part) with a dash instead of another underscore so you can seperate the 2 fields, as per the example above.
Then in your template you can easily do this :
<?php
//resturant router
$seg = ee()->uri->segment(2);
$parts = explode("-", $seg);
?>
{exp:channel:entries dynamic=no url_title="<?php echo $parts[1] ?>" search:food="<?php echo $parts[0] ?>"}
{!-- ... --}
{/exp:channel:entries}
PHP on INPUT
Another Alternative
Or just use the category system? It's what it's intended for, so Pepperoni Pizza would be the category and Luigi's Smoke House would be the URL title. URL's would look something like : /pepperoni_pizza/luigis_smoke_house
or just a permalink to the resturant you want /luigis_smoke_house
or all resturants that server pepperoni pizza /pepperoni_pizza/
.
Just some suggestions...