Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I use the dictionary object to set the property node id for each language
In my user control I use this
int
rowCtr = Convert.ToInt32(umbraco.library.GetDictionaryItem("hotel home node"));
GetPropertyFromAliasAndNodeID(
"umbracoUrlAlias", rowCtr)
to get the node id dynamically for each language/culture.
I setup also the <add key="umbracoHideTopLevelNodeFromPath" value="false" /> in the web.config.
My problem is the GetPropertyFromAliasAndNodeID("umbracoUrlAlias", rowCtr) is not including the toplevel folder which is in my case the language code.
How can I use the umbracoUrlAlias to include the top level folder?
Hi Sherry Ann,
Did you try seting
<useDomainPrefixes>true</useDomainPrefixes>
in your umbraco.config file?
Cheers,
Michael.
Hi,
I think you just need the umbraco.library.NiceUrl() function. This returns the URL of the requested NodeId.
Or am I misunderstanding something here?
Rgds,
David#
What's <useDomainPrefixes>true</useDomainPrefixes> ?
@Biagio: you need to set this to ensure that urls are unique when runnning with multiple root nodes.
So, it's a good thing in Umbraco Multisite installation.
Thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
multilingual nice url in usercontrol
I use the dictionary object to set the property node id for each language
In my user control I use this
int
rowCtr = Convert.ToInt32(umbraco.library.GetDictionaryItem("hotel home node"));
GetPropertyFromAliasAndNodeID(
"umbracoUrlAlias", rowCtr)
to get the node id dynamically for each language/culture.
I setup also the <add key="umbracoHideTopLevelNodeFromPath" value="false" /> in the web.config.
My problem is the GetPropertyFromAliasAndNodeID("umbracoUrlAlias", rowCtr) is not including the toplevel folder which is in my case the language code.
How can I use the umbracoUrlAlias to include the top level folder?
Hi Sherry Ann,
Did you try seting
in your umbraco.config file?
Cheers,
Michael.
Hi,
I think you just need the umbraco.library.NiceUrl() function. This returns the URL of the requested NodeId.
Or am I misunderstanding something here?
Rgds,
David#
What's <useDomainPrefixes>true</useDomainPrefixes> ?
@Biagio: you need to set this to ensure that urls are unique when runnning with multiple root nodes.
Cheers,
Michael.
So, it's a good thing in Umbraco Multisite installation.
Thanks
is working on a reply...