Create Type of Region Plug-In based on "List" Type of Region - oracle-apex

I need to create a Type of Region Plug-In based on List Type of Region.
Standard List gets a List Navigation Shared Component and creates, for example, Card elements as a HTML tags with some href defined in the chosen Shared Component: List. But I need the ability to redefine all a elements as button elements and give them custom CSS classes and HTML attributes for each child element of a List region (for each button), not the List region itself. For example, to create a Menu Popup Card in the similar way as for a button (as described in this tutorial).
But I could not find any way to create a Plug-In with List settings by default but with ability to edit and add custom settings for my plug-in. Neither I found any existing plug-ins in community.
How to do it? Am I missing something?

No need to create a plug-in. If you need a custom Cards template for a region with List type, then go to Shared Components > User Interface > Templates and create it there as copy of Cards, then edit.
Damn it, why APEX is so hard to google? :D

Related

How to make a statically binded rendering editable via Experience Editor (Sitecore MVC)

So I have a layout view within Sitecore Mvc, this view contained a Controller Rendering that pulls in a header and footer navigation. Example:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering")
This specifies a Controller Rendering I've defined in Sitecore. This works great, except when I'm in the experience editor. It doesn't give me the ability to select this rendering. If I create a Placeholder and then define these navigation elements to this placeholder dynamically via Sitecore, then I can, but these navigational elements exist on every page of this layout, so I would like them statically placed instead of using a Placeholder, but I would still like the user to be able to select the navigation element in the experience editor (so I can create custom command to interact with this navigation, such as creating new links, etc).
Does anyone have an idea that will help me achieve this?
Use Edit Frame for that and create Custom Edit Frame Button for operations like adding new element to the navigation.
And remember to pass Datarsource ID or Path as a second parameter to the Html.Sitecore().Rendering() method:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering", new { DataSource = "{some-id-or-path}" })
Here is set of blog posts which can help you to understand how Edit Frames work and how to add them in Sitecore MVC solution:
https://visionsincode.wordpress.com/2015/01/08/how-to-use-editframe-in-sitecore-mvc/
https://www.cmsbestpractices.com/how-to-properly-use-sitecore-edit-frames/
https://briancaos.wordpress.com/2011/11/28/using-sitecore-editframe-in-pageedit/
You won't be able to remove the component or move it around the page (yeah, it's statically bound to one place on your layout), but you will be able to edit it's properties and datasource.
You can try to use GlassMapper views and statically inherit the view from the GlassView.
Then you'll be able to use Editable method to render the field.
But the consideration you need to take is that you'll not be able to set a datasource to the component from the page editor or content editor.
Instead of injecting the rendering through the Rendering method you should be able to use standart MVC RenderPartial.
I've used this approach on one of the projects I've been on and it worked.

List of News Articles In Sitecore (Best Approach?)

I am creating a Sitecore MVC site for a client and I need to create page that will list news articles for the company.
So far, I have created items that use a shared data template called “Article,” and I also have a sublayout (a view rendering) called “Article” that will display these items.
For the list itself, my plan was to create another component (a sublayout) call “News_List”, and to put a placeholder in it called “List”.
My question is this: can I allow the author to insert articles (e.g., N items of type “Article”) into this placeholder via the page editor?
Will SC allow you to insert multiple instances of the same component into a placeholder? Will this break anything?
I believe this is a pretty common question but I have not found a definitive answer. Thanks in advance…!
You can insert as many components (of the same type) in your placeholder as you want.. Just make sure to put the placeholder settings correctly and give it a decent name (not just "list" ;))
But are you sure you want to do this? Your editors will manually need to create a list of components for each article they want to add on the page. Doesn't sound to be very user (editor) friendly.. Maybe you should consider creating a list component that can get a list of articles as a datasource and show those. Or even select them automatically (but that might be not according to your business case)..
Yes, authors can add multiple instances of the same component into a single placeholder.
Assuming that the code of the component doesn't do any stupid things it's absolutely ok to do this.

Configuring Global Toolbar on Siebel CRM

I have a requirement to remove some Global Tool Bar Item such as Apply Target List and Save Target List on Siebel CRM. Other Toolbar such as sitemap and query should stay.
But I cant figure the configuration. I have tried the following Object Definitions
1. Menu
2. Toolbar
3. Class.
I can't find Apply target list and Save Target List.
Although I did find apply target list and save target list under
Menu> Generic Web> Menu Items object definition.
I inactivated and compiled.
But the two Icons still appear on the Global tool bar.
Under Toolbar->HIMain-> ApplyTargetList & SaveTargetList are items. Did you try disabling them ?
Also , please look under Class [CSSSWEFrameList]
If you still cannot remove the Items and are using OpenUI, it could be possible to add a simple CSS rule to hide the entry in the menu list.

Selecting a datasource item for preset components

Before digging into my explanation i will summarize my question:
How do I provide the user (editor) with a user-friendly possibility to select a datasource item for sublayouts that are preset on the standard values?
My situation is as follows:
I have a page template, with pre-defined layout on the standard values.
Let's say the layout consists of:
one placeholder "wrapper"
one sublayout "content"
This sublayout is pre-defined on my page template, but can also be placed in the placeholder using the Page Editor.
It needs to have a datasource item that defines a Title and Body value.
Now, if a user adds this sublayout to the placeholder using the Page Editor, he will get a nice interface to select or create the datasource item (see screenshot).
However, if the sublayout was pre-defined on the standard values, it will be added without datasource (I can't pre-set the data source in the standard values because it's still unknown by then).
At that point there seems to be no way to get to that nice interface for selecting or creating a datasource item.
Ideally I want to be able to add a field to my template that can hold a datasource item which the user can select/create using the nice interface. I looked at the datasource field type, which could be an alternative, but it's still not exactly what I want.
Bare in mind that the content sublayout is just an example.
I understand that in that specific case I could solve it by always adding a title/body field to the template which hold the values if there is no datasource, but for my real world problem that won't suffice.
I don't have a whole lot of experience with the Page Editor (with the new way of working with it) so I would like to get some advice on this subject.
According to what you said here:
Ideally I want to be able to add a field to my template that can hold a datasource item which the user can select/create using the nice interface. I looked at the datasource field type, which could be an alternative, but it's still not exactly what I want.
It seems you want an intuitive data source selector interface in the CMS shell similar to the Page Editor-based UI.
Quick answer: Simply put, there's nothing that does this for you in Sitecore.
Longer answer: There are still some options for you, e.g.
Define a global "dummy" data source and set that to be the data source set in in Presentation > Layout Details of the template's standard values. So every time you create a new page, it will always point to that dummy value to show something.
From here you can do a few things:
If the user must use the shell UI and not Page Editor, they can simply create another data source item for the specific page and update that page to point to it using the existing native interface in Layout Details.
Another option is to write an event handler, say for item:created or similar that when you create an item, auto-create a corresponding data source item for this specific page (whether this auto-created item be a sub-items or global item...) then programmatically set this to be the data source. A similar concept is shown in this video by Nick Wesselman: http://www.techphoria414.com/Blog/2012/May/Sitecore_Page_Editor_Unleashed

SharePoint - List of Folders

I'm trying to implement a list where the only item type is a folder. If someone click "New" they are brought to a form that allows them to enter a folder name, description, and select either "Active" or "Inactive" from a drop-down menu. Inside the folder I want a simple list with only 2 columns.
I tried making a custom Folder content type with the columns I needed and making it the default content type. This seems to work to make the list of folders. Once I go inside the folder and try to change the internal view/list setting (I don't want to use the custom folder content type inside the folder...i just need 2 simple columns) it changes the settings for the list of folders as well. Is there any way for the internal list to have different settings than its parent?
I don't know if this issue is still relevant, but maybe someone else will find my answer useful.
I used to implement a list that contains only folders in the root, which in order can contain few item based content types.
There was two event receivers for FeatureActivated and ItemAdded events, which changes UniqueContentTypeOrder property (the list of content types available for user to create) of the lists root folder and a folder being created respectively. Like this:
List<SPContentType> ctl = new List<SPContentType>();
foreach (SPContentType ct in lst.ContentTypes) if (ct.Id.IsChildOf(SPBuiltInContentTypeId.Folder)) ctl.Add(ct);
lst.RootFolder.UniqueContentTypeOrder = ctl;
lst.RootFolder.Update();
Also, I designated different available list views for root folder and the folders it contains, by specifying ContentTypeID attribute for a View definition.
Unfortunately, no. Since SharePoint is Lists are not relational data, the only options to you are allowing several Content Types. If a content type is available to the list, it's available to the entire list (root, and sub-folders).
One possibility to model what you are trying to accomplish relies on SharePoint 2010 Enterprise. Infopath allows you to customize the New Item Form for a List. It might be possible to edit the form such that it only allows Folders on the Top Level, and List Items within a folder, but I don't know for sure - it's been a while since I customized a List Form with Infopath.