How to tag pages and layout (not assets) in Liferay - tags

I have a Liferay site. I have several pages that needs to be tagged so I can get them in a custom portlet.
I also need to present a page with an alphabetic index of the tagged pages.
I have read documentation and I have seen that Liferay can put a tag or a category only on "assets" (web content, etc.) and not on a page/layout.
Can you suggest me a way to do it?

You are right about tag/category, these can't be applyed to layout (unfortunately).
The best alternative is to use custom attribute and define the extra fields for the page.
See this image
You can read the custom attribute for the page using ExpandoBridge API.
Here an example to read an extra attribute within the theme velocity template.
#set ($customField= $layout.getExpandoBridge().getAttribute("CustomFieldKey"))
Note: Remember to set the permissions on each custom attribute. It's very important!

Related

How to create hook for CMS Block in prestashop

I need to create hook for CMS block individual content in prestashop. So that i can display CMS items in different positions and also i need to display CMS items in home page.
Is it possible to create hook for CMS block. Any suggestions would appreciate
Thanks in Advance
You can use displayTop hook through a custom module and need to change the rendering condition for different pages of PrestaShop.
Every page in PrestaShop has a unique name that can be used to change block content as per your requirements.
The page name can be fetched using following line in any Class file in PrestaShop:
$this->context->smarty->tpl_vars['page_name']->value

identity server how to custom login page

I need to change and customize the login page, implementing the
"IviewService"
isn't not good enough, i need the full layout.
any idea ?
Implementing a custom IViewService is exactly how you change the full layout.
However, if you want to change only the login page, you can do so by adding your own html that implements the same angular logic as the existing login page and adding it to a folder named templates with a file name of _login.html.
If you want to modify the layout (the headers) then you need to do the same this time naming the file _Layout.html.
This is all detailed in the documentation, with the above listed as "Replacing partial views".

Adding buttons to admin user list section of moodle

I need to add a button for each user in admin's user list (admin/user.php).
is it possible to do it from my local plugin? if yes how?
Or I need to edit the user modules manually?
The only way to do this without a core code modification, would be to use the theme (or possibly a local plugin) to inject some javascript into the page to add the button after the page has loaded.
The page itself is quite old, so it doesn't use a renderer, so overriding the generated HTML via the theme is not an option. The user actions aren't designed to be pluginable either.
Depending on what you are wanting to do, you could, of course, create a local plugin that adds a new link to the 'Site administration' tree. On the page this links to, you could add your own list of users, with whatever buttons you wanted on them.

Adobe CQ5 set default page properties

Is it possible to set default page properties value in CQ5 when you created a page? Either by specifying it in templates, component, etc...
Found it, just need to add the attributes directly under
templates//_jcr_content

Extracting the URL of an external link to use as a constant

I have defined some external links to store URLs to which other pages can link to. This way a change of URL by a backend user is reflected sitewide.
I wish to extract these URLs to text to put them them into a newsletter as that would be a better practice than redirecting through the site. How could I go about this ?
You may use a placeholder in the rte link dialog (I assume you use the rte to write your newsletter) and then replace this placeholder in a custom hook (search for contentPostProc-all). There you can read your typoscript config or from any other place (own db table, csv, whatever).
You may also use the browse link dialog hook to add your custom links. Take what fits best for you.