Route
- Path:
/propiedades/{type}-{location}/{id} - Example:
/propiedades/apartamento-marbella/ADO-P-42378 - File:
src/pages/[...lang]/propiedades/[...slug].astro - Type: Dynamic route with static generation
Dynamic Routing
Static Path Generation
All property pages are pre-generated at build time:src/pages/[...lang]/propiedades/[...slug].astro
normalizeSlug function creates URL-friendly slugs:
Props Access
Page Structure
The page uses CSS to toggle between desktop and mobile views:Desktop Layout (PropertyDesktop)
The desktop view uses a “zipper” scroll layout with alternating left/right content.Scroll Items Structure
src/components/properties/PropertyDesktop.astro
Rendering Items
Layout Styles
src/components/properties/PropertyDesktop.astro
Specifications Display
Mobile Layout (PropertyMobile)
The mobile view uses a fullscreen image gallery with a slide-up details drawer.Image Gallery
Fullscreen image slider:src/components/properties/PropertyMobile.astro
Floating Actions Button
Info button to open details drawer:Details Drawer
Slide-up overlay with property information:PropertyMap Integration
Interactive map showing property location:src/components/properties/PropertyMap.astro
Contact Form
Property-specific contact form:src/components/properties/ContactProperty.astro
Internationalization
All text content supports multiple languages:SEO Configuration
noindex={true} to avoid indexing dynamic content that may change frequently.
Related Components
PropertyDesktop.astro- Desktop zipper layoutPropertyMobile.astro- Mobile gallery + drawer layoutPropertyMap.astro- Leaflet map integrationContactProperty.astro- Property-specific contact formShareButtons.astro- Social sharing buttonsFloatingContactBtn.astro- Sticky contact button
Related Services
PropertyService.getAll()- Fetches all properties from APILeadService.submitPropertyLead()- Submits lead for specific propertynormalizeSlug()- Creates URL-friendly slugs