At this point we can start to think about the elements that will be consistent to every page and those that will just reside on the home page. Those that are consistent to every page need to reside in the
application.liquid file and would probably include:
The Homeflow API allows you to fully customise your page titles and descriptions; not only for the home page but for other categories of page as well.
To configure your home page and main titles, you will need to take a first foray into the Agency/Portal admin. To do this you use a link similar to the two links outlined before:
We’ll assume you have been provided with your login.
Now head to
/configure/website/appearance/titling. It should be fairly self-explanatory from here.
To publish the titles and keywords to your theme, all you need do is add the following Liquid tags between the normal HTML tags in your
Homeflow has a general fallback for each category of page should you not opt to customise the wording. Should you want to customise your titles and descriptions, head to:
/configure/website/content/content/list. If you scroll down you will see the various chunks available for the different categories of page. A typical
property details page title could be:
This might output something like:
3 bedroom property for sale in Temple Street, Brighton. A couple of other tags are:
This tag outputs either ‘for sale’ or ‘to let’.
This tag outputs the display address - normally a filtered version of the actual address.
A header would probably consist of the agency or portal logo.
In the agency admin, go to
Website/Appearance/Logos and upload your logo
In the portal admin, go to
Configure/Appearance/Logos and upload your portal logo.
Now in your source, within your header tags or header div tags, add:
To start head over to your agency admin. Reminder:
Then go to
Website/Navigation. From here you can drag in menu items for existing pages or create custom links, e.g. to the
/branches page for example. Once you’ve got your primary menu items, you can then edit each one and add sub-menu items.
Here’s a code construct that would retrieve the primary menu items:
Here’s a code construct that will satisfy a menu dropdown requirement:
###Highlighting the active link
The typical way to achieve this is to assign a category to your menu items and pages via the agency admin. Within your navigation loop, if the page category matches the menu item’s category, then you can add the active:
Your first port of call is to head to the carousel section within the agency or portal admin. You can find that under
Now return to you theme and the
home/home.liquid file. This is one place, and a logical one, where we can add our carousel code:
Sometimes it doesn’t make sense for everything that is featured on the home page to be in home.liquid. On occasions where we want to include content on the home page but you’d rather add it to
application.liquid, you can use the following statement:
And for a handy reference as to what controller is being used, you can add the controller and action as a class to the body tag then inspect the source:
By navigating to your admin area, then following this link:
/configure/website/appearance/colours, you can specify custom theme colours that you can then query in your CSS.
At the time of writing, the Ctesius app supports the LESS CSS pre-processor. To get up and running with LESS, simply add your CSS file with the
lless extension to your theme’s CSS folder.You can then bring it into the theme and have it processed using the following line:
If you would like to use SASS or another compiler, there is nothing to stop you running your compiler of choice locally, whilst configuring it to generate an LCSS file which is then pushed to the repo and referenced in your theme.
Again, the footer is an area where you can hardcode in your design and content, or you can manage the content using the Agent/Portal admin and the
content chunks we have made available.
Content chunks are well-known content areas that get used on all sites - e.g. a header, footer, sidebar and so on. If we add some content to the footer chunk we can then render it out.
Both content chunk sections are then on the left. Checkout the
Site footer chunk, add some filler content for now then save it.
Now, where you want to render the chunk in your source (if it’s the footer then most likely the
application.liquid page), use the following code:
This will render your chunk. Note that you can add HTML syntax into the chunk using the MCE editor.
The Ctesius app can render sidebars automatically once set up. To get up and running with this, you simply add the following line to your
The next step is to create the sidebar. To do this, create yourself a
sidebars folder under your theme’s directory. Sidebars should follow a consistent naming pattern. Here’s some examples:
Next you need to open your theme’s
config.yml and add a
sidebars section. You then quote the controller and action for the page in question. For example, the controller for a CMS page that lived under your
pages directory would be
pages, the action would be
show. The controller for a properties index page would be
properties, the action
index, and so on:
Once you’ve added these prerequisites, your HTML and content into the sidebar, it should render it on the targeted page. As always when using the YAML file, use consistent spaces for indenting to make sure it doesn’t error out.
Flash messages are used to provide feedback to the user after some event. Flash messages include lead send success or failures, user registrations, valuation leads sent and so on.
In its basic form, you have an empty div ready to be populated with a message:
An event and callback function is then registered to populate the container:
Note that you have access to the message contents and type, as well as full control over the position of the div, its styling and behaviour.