jbreuer / 1-1-multilingual-example Goto Github PK
View Code? Open in Web Editor NEWAn Umbraco example of how to use Vorto and Nested Content
An Umbraco example of how to use Vorto and Nested Content
Hi, I have a problem with pulling the data. It would be good to share these solutions in this project. Please help me.
How can I change the "@item.Nam" in the navigation for a specific language taken from variable "urlSegment", (vorto)
<a href="@item.Url">@item.Name</a>
in \Views\Partials\umbTopNavigation.cshtml
How can I change the "title" in the metadata for a specific language taken from variable "urlSegment", (vorto)
<title>@Umbraco.Field("title", altFieldAlias: "pageName") | @Umbraco.Field("siteName", recursive: true)</title>
in \Views\umbLayout.cshtml
How can I change the "BodyText" in the navigation for a specific language taken from variable "bodyText", (vorto)
@Umbraco.Truncate(feature.BodyText, 100)
in \Views\Partials\umbFeatures.cshtml
Best regards, Gregoriii
Wouldn't it be better when you didn't have to set any hostnames and it just takes the languages specified in settings?
My problem is, that we can't call the website with other domains than explicitly configured in hostnames, but we want to manage our domains on our server and don't have to always also set them in umbraco hostnames.
Will it be possible sharing database for SQL Server (* .sql). What has been added to the standard Umbraco database (tables, procedures, index)?
Hi,
I have problem with URL when create new "Document Types". What I need to do to improve?
In web.confing ( \24days\web.config )
connection to the database has been changed (connectionStrings):
from
<add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
to
<add name="umbracoDbDSN" connectionString="server=xxx;database=xxx;user id=xxx;password='xxx'" providerName="System.Data.SqlClient" />
Create New Document Types
Settings > Document Types > Create New Document Types > name: NewDocType value:umbNewDocType
Create content
Content > Home > CREATE AN ITEM UNDER HOME "NewDocType" > (name) NameNewDocType > Save and Publish
Oops: this document is published but is not in the cache (internal error - see log)
"1:54:20 PM INFO umbraco.content : Saved Xml to file.
1:54:20 PM INFO umbraco.content : Save Xml to file...
1:54:16 PM INFO Umbraco.Core.Publishing.PublishingStrategy : Content 'DocTypeTest03' with Id '1128' has been published.
1:54:04 PM INFO umbraco.content : Saved Xml to file.
1:54:04 PM INFO umbraco.content : Save Xml to file...
1:54:00 PM INFO Umbraco.Core.Publishing.PublishingStrategy : Content 'DocTypeTest03' with Id '0' has been published.
1:53:54 PM INFO umbraco.content : Save Xml to file...
1:53:54 PM INFO umbraco.content : Saved Xml to file.
1:53:49 PM INFO Umbraco.Core.Publishing.PublishingStrategy : Content 'DocTypeTest02' with Id '1127' has been unpublished.
How it should create models (using Models Builder)?
How it should look to create models (using Models Builder)? I added the entry in the web.config add "<add key="Umbraco.ModelsBuilder.ModelsMode" value="LiveAppData" />
". Model is created in my directory "\24days\App_Data\Models" but not in "\Umbraco.Extensions\Models"
Can I ask for help me in solving the problem. Best regards, Gregoriii
Hi, first thanks for the great example project, really useful piece of kit.
I'm just extending it to separate each Vorto'd property into separate language fields in my Examine index. So for example, rather than adding just PageContent-en-GB
, PageContent-de-DE
etc., I might have multiple user fields defined (title
, summary
etc.). It will instead add title-en-GB
, title-de-DE
, summary-en-GB
, summary-de-DE
etc.
In doing this, I've got to check the object sender
argument passed in to ExternalIndexerGatheringContentData
.
My question: Why is sender of type object
and not more specific? Is it possible for it to not be of type UmbracoExamine.UmbracoContentIndexer
?
I want to ensure it's the correct type so that I can pull out the UserFields from it type-safely - effectively sender.IndexerData.UserFields
. Can you provide any clarification?
Hi Jeroen
This is a very good example. I would like to propose this 1-1 multilingual solution to my project, but the issue is that we are using Umbraco 7.3.8 version and your solution is in the umbraco 7.4.X version which is not working for lower version. (due to Model Builder). Do you have solution in 7.3.8 version?
Hi @jbreuer,
nice work. I'm quite new to Model Builder but i got everything working quite good now.
Just a question: could you give me some hint on how to obtain a multilang selector in razor view? I did't found any method in the UmbracoHelper to obtain a url based on Culture parameter.
Another idea could be building a dictionary of the IPublished content urls, based on cultureAlias keys
Thanks in advance!
This implementation is very good, however i have one point of situation because how make this when i use Unitofwork and Ioc and unit test, like this project for example http://www.bomboca.co.uk/umbraco-cms/unit-testing-umbraco/ and this is a project him https://s3-eu-west-1.amazonaws.com/bomboca-promo/Bomboca.Marketing.zip ? The my it is a little diferente because i use another project to separe the structure Umbraco of business Layers. I don't understand one thing because you use modelsBulder umbraco and I use vega.USiteBuilder as the exemple i said before.
Hi
Really cool site, like it a lot
You seem to have a lot of missing files in the umbraco folder which causes a few issues when you try to publish the site.
Would you mid checking them in?
Cheers
Stephen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.