Shared element value for use in content items - websphere-portal

I have 2 content items inside a custom WCM library. (IBM Portal)
Both of which have an element, inherited from the Authoring Template they use.
The element is called URL and has a default value in the Authoring Template, of google.com.
If I change this value within Test, or within the Authoring Template after the 2 Content items are created it does not update the value used in both the Content items.
How could I setup such a variable/value? Which could be used in both Content items and always use the latest updated value.

1) Select created content items
2) Press More button - > Apply Authoring Template
3) Select you authoring template
4) Set update existing values checkbox/ add new field, it was added (or similar)
5) Press OK

Approach I went with was to use a component which stores the value.
Any other components/content items etc which need this value can import the shared component.

Related

Using an ID to push items to a specific object's array property

I could use a little direction. I am creating a todo app, that has multiple projects. Each project when instanced has a property, called taskList, that has a value equal to an empty array.
Additionally when each project is instanced there is a unique ID number that is assigned to each project's id property.
I've created an on click event so when a specific project is clicked on from the dashboard, its unique ID is assigned to the add task button's data-id attribute.
Once I create a task and click the add task button, how can I have the task be pushed into the taskList property of the object with the id equivalent to the button's data-id attribute?

2sxc App | Demo Content | Auto Fill

I have a series of modules based on the 'Content' App that I have created demo content for but as per the templates once I click edit the content data doesn't pre fill into the UI fields (which is something I'm trying to achieve).
I know the 'Content' App module templates are not Apps on their own like the 'FAQ'/'Accordion' Apps which I thought were capable of this pre fill presentation of demo content. How do you set an App's demo presentation content to display in the input fields of the UI?
I am currently looking at the Visual Query Designer but is this the only way to assign demo content to auto fill into the UI fields once a user clicks edit?
NOTE: My goal is to create a dnn template page of modules all displaying demo content (each assigned its own one) and then either copy this page or import it to another whereby the demo content has actually pre filled the modules on the new page once a user clicks on the edit button.
Thx
you can go to the "fields" of the content type and click on the "data type" ie sting, hyperlink etc and you should be able to set a default value

How can you attach a content item as an element field of another content item via its authoring template?

Let's say I defined a IBM WCM authoring template called "AT-Image"; it creates content item "CT-Image" that contains elements such as an Image of type "Image", Description of type "Short Text", Keywords of type "Text", and other fields that serve as meta for that image resource.
Now, I need to create a content item called "CT-Article" based off from its "AT-Article" authoring template. Let's say that "Article" item has 3 elements: Title, Summary, and Image. Title and Summary are of type "Short Text". But Image needs to be of type "CT-Image" and not Image or Image component.
Is this possible Out-of-the-Box or is this something I need to implement myself via WCM API?
From my point of view you should use a menu component in the following way:
Let's assume you have got your CT-Image and CT-Article in a common sitearea called "MyArticle" like this:
MyArticle
CT-Article
CT-Image
Furthermore you need a WCM Menu component which uses two selection criteria:
current sitearea as location
CT-Image as authoring template
So then rendering CT-Article with a presentation template PT-Article you can reference the menu component. Therefore, you reference the menu component in the presentation template markup. The menu component then will pick up the CT-Image and render it as it is located in the same sitearea as your CT-Article.
That's rather a content design approach then a technical approach. It's all there out-of-the-box and saves custom development effort.
If I understand correctly, basically you want to create pre-defined images and then pick one of them to display when you create an article. Correct?
Well, the easiest way would be to utilize what WCM already gives you: create an Image Component. You will be able to upload the image and also provide a description, but you won't be able to set keywords or metadata. The workaround for this would be to set the keywords/metadata as part of the article. If that is okay, this would probably be the best way to do it.
By doing that, all you would have to do is select the relevant Image Component from your Image Element in AT-Article.
If you really need the images to be their own content items (rather than components) so that they have their own keywords and other information, then the next "easiest" way is probably to use an HTML Element inside AT-Article. In this HTML Element you will have to use the "Insert Tag" option, and then choose an Element Tag and use "Selected" rather than "autofill" or "current" to navigate to the content item that you want (the one with the image).
The code will look like this:
[Element name="[path]" type="content" context="selected" key="[element]"]
Where [path] is the path to the content item and [element] is the element that you actually want to pull from that content item (such as image, description, keywords, etc.)
context="selected" is the key there. Then you just need to set up your Presentation Template to be able to use this information that you are pulling in from the HTML Element.
WCM 8.5 has the InContext tag.
The InContext tag renders a tag body within a specified context. The new context can be specified as a predefined context by using a UUID, or by path.
For eg. in this case you can use below where key="Image" in InContext tag is the Link element to the CT-Image content item :
[InContext uuid="[Element context='current' type='content' key='Image' format='id']"]
[Element context="current" type="auto" key="Image"]
[Element context="current" type="auto" key="Description"]
[/InContext]

Change ADF Query Panel's Default Component

In my JSPX page, I created a search page by drag-n-dropping the View Criteria (VC) to the page. By default the component's are text box. What I want to do is change some of them to use other components, such as the selectOneChoice component, with binding from another Entity Object (EO), or maybe add a date picker to it.
Is this possible? Or do I have to stick with the defaults?
This is all stuff that can be done in your view object under Attributes. For date attributes, make sure that the type is set to date. I've'nt done this one but for the selectOneChoice component, I'm assuming you can define a list of values on the desired attribute that is based on another view object. Also look in the Control Type field of the Control Hints when you edit an attribute. If you are using bind variable with your search I believe you can define these properties there also.

Salesforce - Create an item of an Object that does not have a tab

Is there a way to create a new item of a custom Object that does not have a tab? The environment I am using is maxed out in tabs so I cannot create a new one which would easily allow me to create a new item.
I'd rather not have to write up a Visualforce page to do this, if possible.
You can create a custom link on the left side if you know the prefix of your Custom Object.
i.e. : "/a0E"

Resources