Pages
Restaurant Profile
The /restaurants/:slug layout and overview child — fetches all restaurant data once and provides it to child pages via inject.
Restaurant Profile
The /restaurants/:slug route is a Nuxt layout route (restaurants/[slug].vue) that wraps all restaurant sub-pages. It fetches every data type for the restaurant once using useAsyncData and provides the results via provide/inject to child pages, preventing duplicate API calls. The default child (/restaurants/:slug/) renders the profile overview: about section, promotions, FAQ, and contact details.
Routes
| Route | Description |
|---|---|
/restaurants/:slug | Layout — data provider, renders hero, breadcrumb, navigation, and sidebar. |
/restaurants/:slug/ | Overview child — about, promotions, FAQ, and contact. |
Components Used
| Component | Role |
|---|---|
XRDProfileHero | Full-width restaurant hero image with name and rating. |
XRDProfileBreadcrumb | Breadcrumb navigation back to the listing. |
XRDProfileNavigation | Tab-style sub-navigation (Overview, Menu, Reviews, Photos, Articles). |
XRDProfileSidebar | Sticky sidebar with key info, contact, and map. |
XRDProfileCard | Compact card used in related restaurants section. |
XRDProfileAbout | About text and highlights section. |
XRDProfileDescription | Extended description block. |
XRDProfileContact | Contact details (phone, email, website). |
XRDProfileContactInfo | Structured contact info display. |
XRDProfileHours | Opening hours table. |
XRDProfileMap | Embedded map showing restaurant location. |
XRDProfileCuisine | Cuisine tags display. |
XRDProfileDietary | Dietary option badges. |
XRDProfileAmenities | Amenities icon list. |
XRDProfileSocial | Social media links. |
XRDProfilePromotions | Current promotions / offers. |
XRDProfileNewsletter | Email newsletter signup widget. |
XRDProfileFAQ | Restaurant-specific FAQ accordion. |
Data Fetching
The layout calls useRestaurant(slug) and fetches all resources in parallel via useAsyncData:
getRestaurant()— profile datagetRestaurantSchema()— JSON-LD structured data injected into<head>getRestaurantReviews()— provided to the reviews child pagegetRestaurantFAQs()— provided to the overview child pagegetRestaurantMenu()— provided to the menu child pagegetRestaurantPhotos()— provided to the photos child page
AI Context
route: /restaurants/:slug
package: "@xenterprises/nuxt-x-restaurants"
use-when: >
Rendering any restaurant profile page. The layout at /restaurants/:slug
is the data provider for all child routes. Child pages receive data via
inject rather than fetching independently. The default child at
/restaurants/:slug/ renders the overview tab.
