When functionality is repeated across the site, it can be taken out of templates and moved into Partial Views – these partial views are repeatable chunks of code that can be placed within templates to achieve a specific goal.
The MegaMenu partial view (ulgMegaMenuPartial.html) renders the menu across the top of the site. The dropdowns highlight the pages underneath a section and featured items.
The MegaMenu partial, has the following logic.
Throughout the uLocalGov starter kit, contact details have been moved out of content and into a contact us section. This allows for greater control over how users can contact the council, and allows for tracking of contact.
The main partial view for contact is ulgContactLinks. Given a contact node, it renders out the links for telephone, email and address into the side section of a page.
When a user clicks on telephone they are taken to the contact page with the number on it, by handling contact this way, it can be measured from each page.
The news is a basic set of Partial views to render news on the homepage (ulgHomepageNews) and list news on a news archive (ulNewsList)
Landing pages form the back bone of the navigation of the site. a basic landing page consists of a number of ‘straight to…’ links for popular items with the remaining items being placed I the ‘more…’ section
The number of items in the straight to is controlled in the landing page
Links are rendered in their Umbraco sort order – changing the order of nodes inside Umbraco changes this order
The “Straight To” and ”More…” text is set in dictionary items. Allowing you to change it once throughout the site (and have it in welsh)