Ideal structure for Umbraco 7 content with a master template - umbraco

I'm trying to make my Umbraco layout. I have set up Umbraco before and used it, but my layout was as following:
- Home
-- About Us Page
-- Products Page
-- etc. etc.
That structure allowed me to visit / and get the home page, but having the subpages (About Us and Products) as children of Home does not make any sense. They are not connected together at all, except they all use a Master template.
If I want to make a better structured setup for my new page, I would assume this would be the best approach:
- Master
-- Home Page
-- About Us Page
-- Products Page
-- etc. etc.
However, this would mean that visiting / would give me the Master template without content, but visiting /home would give me what I want.
So what is the most ideal setup? It seems weird they are all inheriting from the Home document type, because that's what my / root page should be.

I would stick to your original plan & nest everything under Home. Having your homepage under /home/ is a bit clunky.
I use the home template as a container for all the data that is likely to be used in pages throughout the site, so I have a 'copy' section so that there is a place for every page for headline, subheadline, blurb & hero image. By using the home doc type these values can reduce complexity in back end code (if you know every page has a 'headline' field you can use it in a macro without referring to anything else or getting hit by typos).
I also have a bunch of SEO fields, social media integration, as well as navigation fields.
So use the home doctype for what is specifically on the homepage & also for stuff that is universal to the site - hopefully that is a good enough reason to setup all content under home.

Template structure is not the same as content structure.
Your content tree, which is what your plan reflects, is the structure of your site. Consider it as having the same structure as you might see in your breadcrumbs, Home always nests everything else.
Home > Products > Product 1
Your first plan is correct for Umbraco

The only reason why you would want a structure like this
- website
-- home
-- about page
-- product page
is if you want to swap out the "home" page for a different home page.
You can work around the issue by creating a WebsiteContentFinder serving the correct "home" by creating a ContentFinder. If you do so, do add a "homepage" property on the website node, to avoid searching all the children and only picking the first one...

You can achieve the second one by adding a "Content Picker" property in your Master with an alias of "umbracoRedirect"
No additional code needed that is automated by Umbraco, just select your Home Page from Master using content picker property.
You can now then access "/" displaying the homepage content.
Screenshots:
enter image description here
enter image description here

Related

Contao 4 Pagebuilder Module?

I just started a new project on Contao 4 CMS and are a bit stunned by the absense of an easy "editor friendly" way to edit and manipulate the content.
Is there some kind of custom module which adds this "pagebuilder" feature as we know it from other cms systems like Wordpress or Drupal (with Paragraphs module)?
In Contao (all versions) the actual content of pages (i.e. page articles), news articles, events etc. is represented by so called "content elements". You do not need to enable anything in order to be able to create and edit content elements (assuming you have an administrator account - because editing can be restricted for non-admins, depending on the settings). See the manual to get an overview over content elements in general and which content element types are available by default.
Btw. you need to make sure that the "Articles" module is enabled for at least one section of your layout in your page layout's settings, in order to be able to create page articles and edit their content.
See also the Create the first start page article in the manual.

Ember search engine

I am creating an Ember app that has a search engine built into it say for houses. My results change a lot as houses are found / added or removed / sold. Therefore my search results change all the time.
I also have pages for each house which has a similar houses section on it that shows always changing similar houses to this one.
I am trying to find the best way to make this app crawlable to search engines.
I could like discourse use noscript tages for each page but as all my houses pages can hold different information and structure depending on the agent/ seller this would be a lot more work basically duplicating what the client is doing!
I could go down the phantomjs route and cache all my pages and serve via the escapedfragment_ method but i am thinking this would be a resource intensive approach with content changing so much. Also with my house pages having similar houses on them that can change depending on the user / location etc, i am not sure how to cache these sections.
Another method i am toying with is to convert my page / section templates into a serverside template so i can render it on the server. For example when a customer creates a house page via my ember app in the format they require they click publish and i convert the rendered html into serverside template with placeholders etc for data.
Anyone help with this ? Any ideas / suggestions / advice would be great!
I think you've kind of answered your own question. This is all about trade offs and finding the solution that is best for your particular case. There is no silver bullet. Personally I go with something close to the noscript route, but instead of putting things inside noscript tags, I put them in regular divs with a class of no-ember, which are visible by default. Then when the document is ready I test to see if the client supports push state. If so, I initialize my Ember app and hide the no-ember divs. If not, then all of the no-ember divs are visible so that the client can see/use the content like normal.

MOSS to have a certain page available in all sites

I have a MOSS Publishing Site, say it's http://dev. It's basically a magazine site, with an issue for every month, so it's dev/2011-01, dev/2011-02, and so on.
There are some general pages like About.aspx, ContactUs.aspx which should be available for all issues. I don't want to create these pages in every issue/site. I know we can put the page in TEMPLATE\LAYOUTS folder.
But I don't really like it, because I want the pages to reside in dev/Pages folder, so it's in 1 repository, instead of here and there.
Is there any other way to achieve this? Like a custom handler that will direct request from dev/2011-01/Pages/About.aspx to dev/Pages/About.aspx.
You can always write a HttpHandler which will redirect the request for these pages.
However , the best way would be to
Put these pages in a feature
Deploy the feature using Module Feature with GhostableInLibrary=TRUE
Activate the feature on all magazine sites.
This way, your pages will reside on file system in feature folder, but will be visible on all sites as ghosted files. You can upgrade the feature to upgrade the files.
I'm not sure why you would need a custom handler. Either you are leveraging the navigation, which means these pages exist on every subsite, or you are manually entering the URL. If it is the latter, why not point to the URL on the root site?
When I've done something like this in the past, I create a custom master page and add the URLs to the pages in the root site in either the left nav or footer (or both). You should be able to use a URL in the style of: ~sitecollection/Pages/About.aspx

Keeping track of refinements made to page using ASPX (Breadcrumb trail)?

I have done stuff like this before, but I want to figure out the most efficient way of doing this. There is my scenario:
A user can search our site. Depending on that search they have a number of refinements they can make to the data. There are categories for different refinements. Each refinement is represented by a checkbox. The refinements might look like this:
Appliances:
Washer,
Dryer,
Dishwasher,
Microwave
Rooms:
Family,
Dining,
Bedroom,
Game
Each refinement has its own ID. The checkboxes are not ASPX controls. The HTML for the boxes is being built server side. I may want to change that, but not sure if it is going to matter.
When the page is posted back to, I am building the breadcrumbs for it and preselecting (checking) the refinements that were checked. The breadcrumbs are not clickable. However, I need to keep track of what may have been previously checked. So the breadcrumbs should look like this:
Washer, Dryer > Bedroom > Microwave
Each ">" represents a new refinement search. The user can unselect a refinement a remove the item from the breadcrumb list. So let's say they uncheck Dryer and Bedroom:
Washer > Microwave
I need some suggestions on how I should keep track of the refinements and building / rebuilding of the crumbs. TIA!
I don't think breadcrumbs are the right metaphor for this application. Breadcrumbs are a navigational aid, to show the path someone took to get where they are, such as:
Home -> My Account -> Profile -> Edit Preferences -> Change Address
Meaning that the user entered the site via the home page, clicked the My Account link, etc. etc. etc.
This user should be able to get back to the Profile page by clicking "Profile" in the breadcrumb trail.
I think what you really want for this application is a Shopping Basket metaphor, where all refinements are added to a list, and then the list can be displayed at the top of the page in a "My Refinements" area. Bonus points for making the items in the list selectable via CheckBoxes for an add/remove functionality.
Generally, once there's an established metaphor, you shouldn't use it for something else, as users get used to a standard way of doing things. ( I recall coming across sliders being used for a list selector and it was very confusing. Dev. should have stuck with the tried and true Dropdownlist)
I'm making this Community Wiki as I haven't actually answered the question.
Well, i ended up using some hidden input controls to keep track of checkbox states.

How to redirect user to the page they were just at without them noticing?

The website viewer would be at page A, click a link that sends then to page B, but I want them to return to page A without them noticing.
When they click the link it changes the layout the viewer is browsing the site with, so the redirection code shouldn't erase or undo the cookies or whatever are stored with the link click. Thanks!
Edit:
Here's what I'm doing. I have a page called setskin.php that has php code that takes header and footer codes for different layouts and applies them. I don't know how to show code without it going crazy, so there's a screenshot of it here:
http://figmint.uuuq.com/Picture%202.png
I want to change my website so that in a sidebar there will be the same setskin options (so it will be on every page). I was fiddling and managed to make it so when you click the link for the skin you want it changes the skin, but then you end up at the setskin.php page, which I don't want. I was looking for a way to make it so it sends you to the setskin.php page (since I couldn't see how to change that) and then back to where you came from.
You should use AJAX. That way you can do whatever processing is needed behind the scenes with zero impact on the user.
You can check the referer header and return to that. But if that isn't set go to a default page?
Other options include putting the previous url as a parameter, like a 'next' parameter. Then redirect to that after you're done. Quite common pattern used for login.

Resources