Content owned by members - umbraco

I'm trying to work out the best way to have content owned by members (one member has many properties). I tried using relationships but these don't seems fully featured yet and I've also used a member picker on the property which works fine.
What I'm missing is being able to see all owned properties for each member from the members tab (along with the ability to edit/view) from the back office.
Is there a way to do this using the member picker field or do I need to use relationships?
Thanks

I think you can use the EditorModel events to do this. You can use these events to interfere which data will be send to the backend. If you want to e.g. hide tabs, this an easy way to do so.
You can read more about this in the documentation about EditorModel Events.
Or if you do not want to do everything yourselves, check out the Plumber package. It might not do exactly what you want, but it will bring you very far i guess.

Related

Umbraco 8 - hide Member Groups

Can anyone advise if and how I can hide the Member Groups folder within Members in Umbraco 8 for a specific user group?
Failing that, can I give users access to the members section but prevent member group deletion?
thanks
From an API point of view this can be done now with events so it would be up to you at a granular level to decide what rules are applied to hide properties. You can subscribe to the event EditorModelEventManager.SendingContentModel and modify the outgoing model which means you can add/remove tabs/properties, and pretty much whatever you want. If you wanted to pursue that without modifying the core It would also be possible to create a package to have some UI to control these rules if you wanted.

iOS Cross Cutting Concerns

I have a Swift application i'm working on that allows a user to save various settings about their profile. Throughout my code, there are times where knowing these settings/preferences are important for the application's business logic. One of them is where the user works (their job, (which is a row in a sqllite database that has an ID as a primary key). The user is allowed to select one (and only one) in the app at any given time. Think of it like a profile - they can work many jobs, but only have one selected.
The following are scenarios where knowing the workplaceid profile is important:
In my sqllite database, retrieving work/shift information based upon the currently selected work ID(so not the ID from the database, but the ID they currently have selected). I'm passing this into my query.
In an NSDate extension function, when I go to determine some things about their starting date, I need to retrieve their currently selected profile, and use that for the calculation.
Within a particular view model when I want to show/hide certain fields.
On an alert view to show something related to their current workplace.
Now I think the quick and dirty way to do this is simply create a wrapper class to your nsuserdefaults in a utility class. Sure, all your info is stored in sqllite, but your currently selected app preferences are in nsuserdefaults since I can change this around (and it will change). This would parallel my other cross-cutting concerns such as logging/error handling, where I could use similar utility classes for all my work.
The fact that I might call this helper/utility class from every single layer of my application seems like a typical red flag you wouldn't do. Whether it's logging, or a user service to get information.
I'm curious to know what other people are doing in scenarios like this. When you need nsuserdefaults from all over your app, is the answer "eh who cares, just make a utility class and call it wherever you need it" ? Or is there a best practice others have followed with well-designed iOS apps? I know AOP is something folks tend to recommend. Does that have a place in iOS?
Thanks so much stackoverflow :)
The user is allowed to select one (and only one) in the app at any given time.
This tells me you want to create a singleton class. Every time you want to change the profile, you hit the singleton class and set it. That class encapsulates all the logic to get/set whatever you need, and the accessor functions. That's what I've been doing in my ObjC code for many years, and it has served me well. It's extremely easy to debug, and the rest of the code needs to know nothing about profile management (unless it's the UI part where you choose a profile).

What is IdentityPart in Orchard CMS good for?

I havent found any mention in Orchard documentation about IdentityPart despite it being used in some main modules like Comments. I took a look at some relevant sources, but it didn't help me to fully understand it's purpose.
So what's it for and when should I use it?
Thanks in advance!
This is part of the import/export feature. In order to be able to move contents around servers reliably and in a repeatable way that takes into account updated and new items, we need a way to identify content items that's not just a simple id. Some contents have a path but not all types do (widgets, users, etc.). The export/import hooks for any part can participate in building the id of the item and in recognizing it on import. The routable part for example implements the use of path. But for those types that do not have routable, you can add the IdentityPart to fulfill that role. The id that gets exported in the end is a composite of all contributed ids.
Makes sense?

Extending Blogpost Contenttype in Sharepoint 2007

Has anybody ever used blogpost contenttype and extended it and added some column to it. I know we can add columns to it using the GUI (List Setting).
Can we do this declaratively and add it to the portal using feature, so that we can create a deployable solution.
Paddy
I have not tried this, but I don't see any reason why you couldn't. The only thing that gives me pause is that Blogs are a little different than most lists because the List Definition is not in a Feature but is rather part of the Site Definition. You could create a Feature with your custom Content Type and staple it to BLOG#1. However, you will still need something (probably a Feature Receiver) that will modify the instance of the Posts lists by adding your custom columns and associating your custom Content Type.

ASP MVC Creating Form Rows Dynamically

I haven't even attempted this yet and am creating this question for advice really.
I have a strongly typed page which receives a form model composed of several components. It is to create a mitigating circumstance (MC) for a student at a university for my final year project. A MC can be composed of the initial problem, assessment extensions, and I use a multi select box to allow the user to select staff retrieved from the database which are able to view the MC once created.
The thing is I feel that a student could be granted many assignment extensions for one problem. I am wander if it is possible to include a button/image on the form which when clicked will create a new assessment extension object, and duplicate the form components to set the values for the object? This would all need to occur without any page refreshes.
Any advice, or links to good tutorials would be appreciated. I have so far been unable to find any suitable examples.
Thanks,
Jon
There are a number of ways to do this, but the fastest is to create a javascript handler which creates the form controls without any sort of server request, all you need to do is keep track of how many items are in your list so you can name the form controls correctly.
Start by making a button that when you click on it creates form controls. Once you get that, work on the naming.

Resources