I cannot select a category in a web content. (Liferay 7.4.2) - liferay

I want to select a category in a web content in Liferay 7.4.2, but I cannot select it. I installed:
Liferay 7.4.2-g3 CE Bundle
JDK 8u221
MySQL 8.0
In the "Category" option, I create a vocabulary and a category.
1. Vocabulary
2. Category
In the web content option, a structure is created with the "title", "content" and "image" fields.
In creating web content, the structure is selected. In the "Categorization" option, the field to select the category is not displayed.
The problem is that I cannot select the category in the web content. I do not know what I'm doing wrong.
Regards!

When creating a vocabulary, you have to specify to which asset type it is related to.
You can edit Noticia vocabulary and associate it to the structure of your web content or you can associate it to "All Asset Types".

I have same problem and created many categories and set All Asset Types but still not showing in the right sidebar. There must be a bug. I repeated the same steps in different installation and it worked.

Related

Liferay 7 Eclipse IDE override default categories behaviour

I need to create a portlet in order to change the default category behaviour/interface in Liferay 7.
My objective is to duplicate assetcategory table, expand and change its columns, and use this new table as a reference for categories within Liferay backend.
Therefore there are three key points my portlet has to update:
The category organization UI to create/update category tables on
DB. I’m able to create a new Liferay module project (panel-app template) which can present the UI backend interface from the side menu and interact with the DB.
Override default category selection panel within web content
properties panel (metadata > category select). I can create a new
Liferay module project fragment to override the
com.liferay.asset.categories.selector.web, however I’ve noticed I can
select only one file path (eg. META-INF/resources/view.jsp)
Override default asset publisher filter behaviour in order to allow
my custom categories selection. I’ve not yet investigated this
point.
I’m currently stuck at point 2 because after creating a new Liferay module project fragment, set the target Host OSGI Bundle to com.liferay.asset.categories.selector.web (which I believe is the correct one, please correct me if it isn't) and selecting the overridden files as META-INF/resources/view.jsp, I can’t proceed to redraw the category selection interface.
Here my attempts:
Updating the code view.jsp (eg. adding some text string) I can correctly
see them in the portlet.
Removing/commenting all the code in view.jsp an error is shown:
Asset category selector is temporarily unavailable
Selecting all three files available to be overridden in the main
portlet wizard (META-INF/resources/view.jsp, init.jsp and
init-ext.jsp) and updating view.jsp (like the first example) nothing
happen in the portlet
Some screenshot below:
Case 1
Case 2
Case 3
I need to create a portlet in order to change the default category
behaviour/interface in Liferay 7. My objective is to duplicate
assetcategory table, expand and change its columns, and use this new
table as a reference for categories within Liferay backend.
Just this alone sounds like a humongous task, bigger than what would fit into a stackoverflow question.
AssetCategories are used in every single content type, e.g. WebContent, Blog Articles, Message Board Posts, Wiki Pages, Knowledgebase Articles etc.. Replacing such a vital component by your own implementation is something that will safely ruin your next upgrade experience, because there you'd have to do this again, bringing your code to whatever changes will be made in the next version. And this "upgrade" includes Security Patches.
Overall, your premise sounds to me like a x-y problem and I'd rather recommend that you step back from your intended solution and look for other options to meet your business requirements. There surely are some.
My recommendation: Rather add something to the platform than ripping out a very central and generic component, reimplementing it in a business-specific manner. If you need a different filtering than Asset Publisher provides: Build your own Asset Publisher and implement the business specific rules there. Or think again about organizing your content in a different way than you currently organize it.
Unless you're already a Liferay Core Developer and are asking for a hint on how to change the implementation for the next version. But your question history here doesn't look like it.

Liferay Asset Publisher category ordering

I am using an Asset Publisher in Liferay DXP and grouping the displayed assets by a category vocabulary. I would like the categories to be displayed in a particular order but it seems to be alphabetic and the configuration doesn't provide any controls for this. I have a custom Asset Display Template but it controls the display of the assets within each category group, but the not the groups themselves. Can this be done?
Thanks!
The asset publisher offers an order and grouping configuration. Is it not working for you?

Orchard CMS - dynamic query based on TaxonomyField of current content

I am looking into using Orchard CMS for an upcoming project and have hit a block. The site need to display articles of various types alongside a list of recent articles of the same type.
To that end I have:
Created a custom ContentType called Article which includes a TaxonomyField for ArticleType.
Created a custom theme with zones to reproduce the layout the customer requires. (Including RecentArticles.)
Created a custom widget layer to show/hide the RecentArticles zone based on the current ContentType. (I.e. the RecentArticles zone is only populated when we are displaying an Article.)
Created a Projection to show recent content of type Article.
I see that I can use the ArticleType taxonomy field to filter the source of the underlying query of part 4. However I need that filtering to be dynamic based on the ArticleType of the currently displaying content.
Is this possible? Is there an alternative way to reach the same result?
Thanks in advance.

Checkbox list in Orchard CMS

Is there any module in Orchard CMS that I can install to get a checkbox list? I checked in the gallery but could not find one. If there is none, is there is a workaround this?
I want to associate a product item with multiple categories (fixed set of categories).
Thanks!
EDIT :
I checked the Taxonomy module as per the suggestion. Now, I want to access the terms in the view. I have seen some posts where they can access it using
(IEnumerable<Contrib.Taxonomies.Models.TermPart>)Model.Terms
Using shape tracing, I am trying to figure out how to access the terms. My model doesn't have any terms field! I can access my custom type (Project) which has 'ProjectCategory' as Taxonomy Field. But there is no mean to view/select terms from there.
See attached screenshots.
Any idea?
I don't think there is a module specifically for checkbox lists, but it sounds like the Taxonomies module might be what you're looking for. You can add a Taxonomy field to your product content type, and define a Taxonomy for that field that contains all your categories.
Once you do that the editor page for your products will have a checkbox list (or radio select if you allow only one in the taxonomy field's settings) for the "Categories" taxonomy.
I managed to access the terms the following way :
IEnumerable<TermPart> assignedTerms = _taxonomyService.GetTermsForContentItem(contentItemId, "NameOfTaxonomy");

Create a list of pages in Orchard

Lets say for example, I have a list of products that each have it's own page... in what way can I create a single page that will list each product as it's contents as a list (with hyperlinks)? Not really sure how to do this directly in Orchard - or will I need to create a custom page / widget? Thanks for any help... new to Orchard and not sure how to tackle this.
You have a couple options. I believe the Orchard gallery at orchardproject.net has a module called Simple Commerce that may solve your problem. (it's simple so it might not)
(In the following section, I've tried to boldface the terminology words that are 1) are crucial to understanding how to use Orchard and 2) helpful in finding your way around the dashboard)
Another option may be first creating a Content Type--probably one named Product with some Fields describing an individual product. Price, SKU and description come to mind, but you'll be better able to describe your own products. Each Content Type in Orchard can be associated with any combination of Parts. You may have to research which ones you actually want for an individual product, but I'd recommend:
Body (this could replace the Description I suggested above) You could include any amount of HTML/script in this section to make your individual product pages look fancy!
Common (this has to be added when Containable is used)
Containable (this will allow the items to be listed)
Route (so you can link to a specific product)
This gives each product its own slug (URL)
Tags (to allow products to be categorized)
Now, you need to create a new List from the dashboard so you can display the products together (and inherit other features like pagination, etc). Be sure to select the Product Content Type in the Contains drop down list.
Then, you can start creating your Content (your Products) one by one. In the dashboard, click the new Product item and describe each new piece of Content.
Finally, you can link directly to this new List using the Products List's *slug*. You could (and might want to) add the Products List to your main navigation menu. Clicking the Products List and checking the "Show on main menu" box will automagically add a navigation button directly to this page. You could, of course, link to this List from anywhere using the slug (also found on the list's edit page)
This page, from the Orchard documentation pages describes more things you can do with a list of content like modifying the layout of the list, placing content fields in different places and even converting your products to widgets which you could use to display some promotional product offering in a special spot on your site.
I highly recommend reading through at least the documentation provided on the Orchard site to get a good grasp of what this CMS can do out of the box and what you would need to write custom code to accomplish (which you could do in this case, but Orchard can handle it out of the box)
Hope this helps!
Two ways to do this:
http://orchardproject.net/docs/Creating-lists.ashx and http://orchardproject.net/gallery/List/Modules/Orchard.Module.Contrib.Taxonomies

Resources