News Providers with different fields
Hi,
I wanted to have different fields as per different provider for new in sitefinity 4.4.
I have added three providers to news using administrator -> advance settings.
but whenever i add a news in one provider, it is getting display in all other providers, except the default openaccessnewsprovider.
how should i avoid this? i want news as per the assigned providers.
and i wanted to have different fields to each provider.
How should i manage this.
Please help...
Thanks & Regards.
any solution ?
Hello Shalaka,
If you have implemented you custom news providers properly, when a new item is created in one of the websites, it should appear in the others. Can you verify that you performed the same steps as listed below to be sure that you aren't missing something:
1. Navigate to Administration -> Settings -> Content- > Providers.
2. Create a new provider with the same fields as the OpenAccessDataProvider, but with a different Title.
3. Next step is to create a new connection string, which will point to the database of the other project (the subdomain project).
4. Go to Data - > Connection Strings -> Create New.
5. The fields of the custom connection string should be filled the same way as the fields of the initial connection string (Sitefinity). The only difference will be the initial catalog property of the ConnectionString field. In it you should specify the name of the database, used by the other project.
6. Go back to Providers and the newly created custom blogs provider. The last thing that has to be done is to add two parameters to the custom provider.
7. The first parameter is applicationName and is completely identical to the applicationName parameter of the OpenAccessDataProvider.
8. The second parameter is connectionString, where we specify the connection string, which will be used by our custom provider. That's how its properties should be filled out:
Key: connectionString
Value: NameofYourCustomConnectionString
Greetings,
Jen Peleva
the Telerik team
Sorry. But this is not as per my requirement.
My requirement is - I need different metafileds as per news provider.
Ex - I am having two providers - Pro1 and Pro2 .
If i am adding news for Pro1 then i should able to fill following fields - Title , Summary
If i am adding news for Pro2 then i should able to fill following fields - SearchName , Title.
Now please tel me that how can i achieve my requirement in Sitefinity 4.4 ?
This works, in that I can now see lists from the second provider. But when I go to put a list into a page, I don't see the lists from the other provider. How do I do that?
Hello,
First of all I want to clarify the main purpose of the provider model. The idea when creating separate providers is to separate data logically. However, this is vaid for data from one provider. Sharing information between two projects is is a possible, but not very reliable use of custom providers, since it raises a lot of question. Here are some of the drawbacks you must keep in mind. You can proj1 and Proj2 and you're pulling items from proj2 to proj1:
If you'd like to pull custom fields from another project, you should also keep in mind that this will not pull taxonomies - since taxonomies have unique ids in the database and if the custom fields are from type texfield you can try creating a field with the same name as the custom field in the project you're pulling items from. This will create a mapping between the custom provider and the database.
Elizabeth, each contentView widget has a ProviderName property, exposed in the designer, where you can set the provider from whcih you'll be pulling items.