Link to pimcore object from within plugin - pimcore

I'm developing a plugin that I would like to link to the existing admin interface components - i.e. link from a grid view to an object crud screen.
I know I can do this using deeplinks like in the examples here.
However I want to maintain my open tabs.
Im using Pimcore 2.0 release. This I would have thought would be a standard feature in the admin section?
Anyone?
Cheers

You should handle grid item click and call pimcore.helpers.openObject(id, type);
For reference you can check onTreeNodeClick handler in pimcore.

Related

How to access new user defined DAC

I'm having an issue, I created a custom table, added it to my customization project as a new DAC. The code is there, but how do i call this in a graph? I tried instantiating it as its own object, tried performing a pxselect, creating it as a viewname. None have worked for me, I looked through the documentation for "Generating a Data Access Class" And that doesn't apply to the ERP framework i get errors trying to generate class via that process.
Any ideas on how i should implement the new DAC to be accessible in my graph?
Thanks!
Found the solution, I incorrectly called my PXselect initially.
public PXSelect<UsrKSPOReceiptWeightSplit> WeightSplits;
Take your extension class from the AppRuntimeCode folder and cut/paste to your VS project folder. From there you can access your custom fields etc. Today in the Acumatica framework this is the procedure until this is fixed in the future. In the T300 manual this is covered in detail.
Here's a summary:
1. In Customization Mgr - create your data extensions
2. In VS copy the files that CM creted to your project to get a reference
3. Compile your extension library
4. When publishing your project you will have to delete your Customization extensions because there will be duplicates when you created your extension lib in VS.

Custom Module Not Showing Under Widgets

I am creating a custom module for "latest news" type of functionality. I have been following the docs on the Orchard website (http://docs.orchardproject.net/Documentation/Getting-Started-with-Modules-Part-1) and despite following this tutorial I cannot see the widget show up when I click on the "widgets" from the admin in order to assign it to a layer.
I am able to enable/disable the module and it appears to be working correctly on this page, but it doesn't show up on the Widgets section of the admin.
I have spent hours trying to find any answers, but haven't been able to so I'm reaching out here in hopes someone can offer some advice. How do I get my custom module to show up under Widgets? All I have done at this point is followed along with the tutorial they have on their website.
You need to create a ContentType that - as #devqon stated - has the CommonPart and WidgetPart attached, and it's stereotype is set to "Widget".
Have look at Orchard Doc's tutorial on writing a widget.

Using custom control from another database

I need to use a custom control which is a simple navigation bar from another database
navigation bar is made with twitter bootstrap css framework,
why do I need to use a custom control from another database?
because this navigation bar is going to be common to four notes Databases,
how can I implement this more efficiently?, a control that is common to four databases
Domino includes template inheritance features that allow either an entire application or a specific design element (like a Custom Control) to be updated whenever the template design changes. You could link the shared Custom Control in each of your four applications to a common template so that, if you need to make changes to it, you only have to change it in one place. You can not reference a Custom Control that only exists in another application; you'd have to store it in each and link the design to keep it synchronized.
Alternatively, you can use the Extensibility API to convert it to a library component. Controls of this kind can be used in any application running on a server that has the library installed. A video tutorial for this process can be found here.

How to secure content in Orchard CMS

I'd like to use the roles and membership ability of Orchard CMS to limit access to a staff portal in Orchard CMS. At present there doesn't look like there's an out of the box way to do it.
I've found numerous references to modules that should be able to help out but none seem to work.
Very Simple Permissions is a codeplex item suggested by some that has a dead link nowadays and doesn't seem to exist on codeplex.
Science Project: Quanta destroys my site everytime I try to install it with a missing dll issue, and not sure if its what I need anyways.
Does anyone have any guidance as to how to either: show/hide menu items based on roles using the standard menu system or advanced menu plugin
or
limit content visibility based on roles. If its a module fantastic, otherwise don't mind getting my hands dirty with some coding but a point in the right way to do this mvc style would be great. I'm going to presume I need to edit the controller for the menu module to check for current membership and adjust the view data accordingly. I'm moving away from webforms. slowly. Still getting my head around the framework.
Thanks for checking in.
For those who are still struggling with this, there's a module is called ContentPermissions which is available here:
gallery.orchardproject.net/List/Modules/Orchard.Module.Orchard.ContentPermissions
Once installed, you can then add the ContentPermissionsPart to the Content Type you want to secure.
Quanta really is what you want. You are probably missing one of its dependencies. Pete, the author, is also super-active on the CodePlex forums so if you ask there, you'll get an answer.
UPDATE: Orchard 1.5.1, the current version as I'm writing this update, supports content item permissions and menu trimming out of the box.

Which is the better approach in custom pages?

I want to create a custom new item page for sharepoint but there are two approached that I
can use and I want to share your experience in determining which is better.
The first: is to create a page in a library then create a C# library project to handle
the events of the controls on the page.
The second: is to define a feature of the content type of my list and specify the new
item form to be my custom form, then create a website containing the custom form and put
this site at the layouts folder.
for me the first approach is fine but the problem is that a user may access the default
sharepoint new item form which I don't want to happen.
but I don't like the idea of placing the form in a library on the site.
so which is better in your opinion ?
thanks
i suggest you to go with your second approach ...
Create a completely new feature that allows you add your functionalty of page creation and any customization realted to that and deploy this one to the 12 hive features folder as a new feature and every time you want have such a page created you can you this template and create the page...
Well, frankly, I'm confused by both of your suggestions.
I don't see how the first one would ever work.
And the second one; you don't "put sites in the layouts folder".
Here's what I would suggest you to do:
Download and install the WSS Extensions for Visual Studio.
Create a List Definition using these new templates.
Copy the NewForm.aspx from the 12 hive and Customize it.
Download and install the WSP Builder from Codeplex.com
Add your custom list definitions and files to a new Feature project in WSP Builder.
Package the Feature up to a .wsp using WSP Builder and you are good to go.
Your custom page(s) should be placed in your custom folders in my opinion.
Hope this helps.
Your concern in the first approach is that people will still be able to access the default form. If you are not opposed to using a custom control template for a content type definition, I recommend creating a very simple redirect control template and assigning it to the content type's "New Form". Such a control template need only contain one custom control, which has an OnInit or OnLoad method that contains little more than a Page.Response.Redirect call. Make that redirect point to the page you create in your first approach, and now whenever anyone tries to access the default new form for that content type, they will instead be directed to your custom page with all of your custom code. It is perhaps a bit of a hack, but it's definitely functional.

Resources