Is it possible to edit TV-params of child resources while editing parent resource? - modx

Is it possible to edit TV-params of child resources while editing parent resource in backend?
So I want to output all published child resources of News category in backend as dropdown select. And I want to edit TV-params of this child resouces.

Related

Add Pin context menu item to include parent node DisplayName

Using VisualHint SmartPropertyGrid.NET, I am trying to access ParentValue.DisplayName of a selected property but ParentValue is inaccessible due to protection level. Is there another way to get the DisplayName of the parent node of currently selected property.

Forms: Creating one item before another

What should be the best UX for a situation where one set of record cannot exist without another.
Take a scenario in an application where a child can be connected to zero or more parents.
If a user of our application finds himself filling a form to create a child but the parent for the child does not exist yet, what is the best approach to creating the parent and then attaching that parent to the child.
Should the child be created without the parent, but updates can be done to add parent to child, note that this also has its own issues as the page where the addition will occur might also need to create the parent.
Have a link on the child page that says "create parent", and route back the user back to the child page after creating the parent.
Have a button bring up a modal that has the parent form and allow the user to create the parent before returning.
I don't like any one of these three options and I am hoping there are better approach out there.
Sorry for any typos or ambiguity, in bit of a rush, also not sure if this is the right place to ask the question.
Since the records are depending on each other I would make sure the user submits these together but make it look like 2 different elements on the same page.
You could use a tab-menu to switch between the child and parent but both should be filled in before submitting. Some inspiration even though you don't need to fill in multiple tabs here. Just make sure it's easy for the user to see that he needs to fill in both tabs.
Another option could be to have the child form collapse when finished/closed like a drop-down menu with an expand arrow button incase you want to edit it again. And the same with a parent box below it. Something that looks a little like this.
They could both be closed at the loading of the page so the user sees both boxes.

Continue execution of parent Dialog in Dynamics CRM

I have a Dialog in which I've linked a child Dialog. I want to the execution of the Dialog to the parent dialog once my child dialog has completed executing.
How can I achieve this? My child dialog isn't throwing the execution back to the parent Dialog in Dynamics CRM.
That's not how they work out of the box. When you go to a child you transfer control to child and the parent ends.
You could look to rearrange your dialog;so the last step of the child, is to start the parent as a child dialog. The parent dialog would then need to somehow skip to the right page. Or it might be easier to break the parent dialog into multiple parts, which are chained together using start child.

Replacing sitecore layout in parent and child items

I am creating a new footer sublayout in sitecore for use in multiple sites (we run a multi site environment). Currently a sublayout called StandardLayout is used, but I would like to change this across several of our sites to a new layout GlobalFooter.
The problem is that child items of the Home Page have overridden layout components, so what I would like to know is if there is an easy way to change the layout without losing all of the overridden components (as I expect that I may need to reset the layout in order for the flow down to occur)?
I am hoping to be able to just change the top level element (Home) and then have this flow down to the child elements, otherwise this task will become very long and tedious if I need to go through each item and change the presentation to use the new footer.
The icon circled in red in the image above indicates that the presentation has been overridden for that particular sitecore item.
To answer your question, directly, there is no way to apply an update of the presentation details of a template to templates that inherit from it that have had their presentation details changed without losing the changes.
The solution described in the blog post you linked to is the best solution for updating inherited presentation details in this manner. IMHO, I believe that this functionality should have been built into Sitecore long ago as a separate button on the ribbon, and you may choose to add one if you are so inclined. If you do not have the time to do so however, creating an admin page that you later delete from the site after using is a perfectly viable solution as well.
This post appears to detail a way that I can achieve my goal, basically I would create a admin page that does not publish and put the code in the blog into it to update the layout via a button trigger.
https://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/09/Programmatically-Update-Layout-Details-with-the-Sitecore-ASPNET-CMS.aspx

Proper way to change a instantiate button in parent view/control

I'm creating a single-page web app that has one controller for the overall page (PageController) and separate child controllers for two views (ViewController and EditController).
ViewController needs a button called "Edit" in the titlebar of the app, EditController needs a button called "Save". The buttons occupy the same space, but have different labels and different on-click handlers. The titlebar belongs to the parent template/controller (i.e. PageController) scope.
One way to accomplish this is to create the button in the parent scope and let the child controllers change the text and override the ng-click handler - but I'm thinking there's probably a better way with Angular. I'd like some way for the child controllers to "inject" (not sure if this is the proper use of the word here) their button into to the parent template and handle the onclick locally, making the parent agnostic of what goes on in the child controllers...
I would think about your "views" differently. To me, titlebar is a view, just like your View and Edit views. It should therefore either contain all of the HTML it needs to render whatever you might want to show in that view, or it should know which files to ng-include.
Views are driven by models. The View and Edit controllers should call methods defined on whatever controller (or service) contains the titlebar model to set some state/properties appropriately. The titlebar view/HTML would use ng-show/hide or ng-include directives to show/include the appropriate HTML based on the current state of the model/$scope.
To be notified of a button click, the View and Edit scopes could $watch a model/$scope property for a change. E.g., <a ng-click="buttonState.clicked=true">...</a> I'm using an object with a clicked property so that the child controllers can reset the value inside their $watch callbacks (if a primitive was used, resetting would not work -- a new child scope property would be created):
$scope.$watch('buttonState.clicked', function() {
buttonState.clicked = false
... handle button click here ...
}

Resources