-
Notifications
You must be signed in to change notification settings - Fork 4
Configuration
Spud Inquiries Supports several configuration options in your environment.rb file.
Spud::Inquiries.configure do |config|
config.default_contact_form = "contact"
config.base_layout = "application"
config.mail_delivery_format = :html
config.from_address = "[email protected]"
config.enable_sitemap = true
end
The above code block could be copied in your environment.rb file as these are the default values. But what do they all do you may ask?
config.default_contact_form = "contact"
This is the url friendly name of the form in the inquiries engine that will be routed to your contact_url(). By url friendly i mean the parameterized/lowercased/hyphenated name. (i.e. "about-us" would be the name for the page titled "About Us").You can also link to forms by their name (i.e. "/contact/work-order") would go to the form titles "Work Order".
config.base_layout = "application"
This is the base layout with which the contact form will be rendered
config.mail_delivery_format = :html
This configuration option is currently not hooked up and has no effect on mail delivery.
config.from_address = "[email protected]"
This sets the from address of the mailer which sends email notifications to the recipients specified in the inquiry forms.
config.enable_sitemap = true
This enables the sitemap for the inquiry form by adding it to the /spud/sitemap.xml sitemap index file. It creates a list of sitemap urls for all the various inquiry forms.
This enables the sitemap generator with the route: /spud/cms/sitemap.xml. It also adds this to the sitemap index at /spud/sitemap.xml for optimal seo.