I would like to have the url to be /frontpage/page - and besides that, have the frontpage have another url-name, ie. my-page. So in the end it's /my-page/page.
Is that possible?
The structure is imported in using the ContentService, from a set of html-files. The container is used to find where the imported pages should be located.
Have you tried playing with the "Culture and Hostnames" feature?
Right click the "Frontpage" and then "Culture and Hostnames". Add the URL for example "http://mydomain.com". If you also run it local, you can add "localhost:xxxx" as a domain.
Then the root will be the "Frontpage".
In your example, you should probably add the URL to the "Container" node.
I do not know if you can have a property that change the node's name in the url.
Overriding the default url Umbraco uses for a page is easily done.
Create a textstring property on the doctype associated with your 'Frontpage (level 3)' page.
Name the property something like 'Override url for this page'
The alias for the property must be 'umbracoUrlName'
Save the document type and go to the Content section and select the 'Frontpage' page. In the 'Override url for this page' field, enter the new url you want, such as 'my-page'.
The second part of your question is a bit trickier. Certainly you could use an IUrlProvider or maybe a url rewrite rule in the site's web.config would do and would be less complex to implement or maintain over time.
The first thing I'd try, though, is to right-click on the (level 3) page in the Content section and choose the 'Manage hostname and culture' option. Normally this is used to assign domain names for when you have multiple sites in your installation. But I wonder if, with a bit of trial and error you might not hit upon a solution by either assigning the domain to the level 3 page? It's worth a few minutes of experimentation before bothering with any custom rewrites or c# code.
Leave out an ancestor node in the url
I have a structure like this:
This renders the url container/frontpage/page.
I would like to have the url to be /frontpage/page - and besides that, have the frontpage have another url-name, ie. my-page. So in the end it's /my-page/page.
Is that possible?
The structure is imported in using the ContentService, from a set of html-files. The container is used to find where the imported pages should be located.
Have you tried playing with the "Culture and Hostnames" feature?
Right click the "Frontpage" and then "Culture and Hostnames". Add the URL for example "http://mydomain.com". If you also run it local, you can add "localhost:xxxx" as a domain.
Then the root will be the "Frontpage".
In your example, you should probably add the URL to the "Container" node.
I do not know if you can have a property that change the node's name in the url.
Overriding the default url Umbraco uses for a page is easily done.
Save the document type and go to the Content section and select the 'Frontpage' page. In the 'Override url for this page' field, enter the new url you want, such as 'my-page'.
The second part of your question is a bit trickier. Certainly you could use an IUrlProvider or maybe a url rewrite rule in the site's web.config would do and would be less complex to implement or maintain over time.
The first thing I'd try, though, is to right-click on the (level 3) page in the Content section and choose the 'Manage hostname and culture' option. Normally this is used to assign domain names for when you have multiple sites in your installation. But I wonder if, with a bit of trial and error you might not hit upon a solution by either assigning the domain to the level 3 page? It's worth a few minutes of experimentation before bothering with any custom rewrites or c# code.
Let us know how you finally solve it.
cheers,
doug.
Looks like there is a "umbracoUrlName" property you can add to a node.
https://our.umbraco.org/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline#segments
So if this "umbracoUrlName" has a value, that string will be the node's name in the url.
is working on a reply...