PHP Car RentalUser Manual Visit PHP Car Rental →
Customizing & Technical

Customizing the template

The template is plain HTML and CSS. You can change it with any text editor and no build tools.

Where the template is

templates/modern/template.html is the page frame (header, menu, footer). Styles are in assets/css/style.css and scripts in assets/js/app.js. The content of each page is inserted at <site content/>.

Template tags

TagReplaced with
<site logo/>Logo (image or text with icon).
<site menu/>, <site mobile_menu/>, <site footer_menu/>Menu links from the Pages list.
<site user_menu/>Login link or the user drop-down.
<site languages_menu/>, <site current_lang/>Language switcher and the current code.
<site title/>, <site description/>, <site robots/>, <site og_image/>SEO values of the current page.
<site contact_phone/>, contact_email, contact_address, company_name, taglineValues from the settings.
<site social_media/>Social icons.
<site post_car_url/>, <site home_url/>Frequently used addresses.
<site content/>The page content.
{{text_key}}An interface text of the current language from languages/xx.php.

Colors and spacing

The top of style.css defines CSS variables (--primary, --secondary, --accent, --radius ...). The values are overridden by the branding settings (Logo, colors and branding), so edit the CSS only for structural changes.

Create a new theme

  1. Copy templates/modern to templates/mytheme and edit the files.
  2. Set the theme name in the database: UPDATE carrental_settings SET setting_value='mytheme' WHERE setting_key='active_theme';.
  3. Reload the website.

Custom tags

A tag <site banner/> in the template runs extensions/banner_tag.php and inserts its output. This is a simple way to add dynamic blocks such as a list of the newest cars.

Change interface texts such as the hero headline in languages/en.php: find the key (for example hero_title_a) and edit the value.

Last updated