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

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.

Related

Store TYPO3 fluid request variables (i.e. searchform) for bookmarks

What's the best practice to be able to store fluid form variables as a bookmark (for simple search filter storing)?
We have a simple extbase&fluid plugin that shows searchfilters and searchresults. The filters are a collection of input and select fields, all created with . Fluid puts in a lot of extra parameters with _referred information and chash's into the request.
Now we want a visitor to be able to bookmark a search result easily. If we use a HTTP GET request, the URL sadly exceeds the URL variable limit because of all the extra parameters; and without them, the fluid plugin won't take on the arguments (unless we disable caching of the whole page?).
The best way (imo) is to generate a clean url that can be stored. In Fluid you can add a link with only the parameters you need and add an onclick event with JS to add this link as a bookmark.
<f:link.action action="yourAction" controller="yourController" arguments="{filterArguments}">Add Bookmark</f:link.action>
How to add the bookmark function with js(jQuery):
How do I add an "Add to Favorites" button or link on my website?
It is also a good practice to configure realurl to produce nice urls for your extension

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.

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

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!

Where are subdomains ("shortcuts") defined in TYPO3?

On a corporate website managed with TYPO3 there are shortcuts defined which lead to a page on the site.
Example:
Corporate website is www.acompany.com
Then there is a site www.acompany.com/coolproduct which is redirecting the user to www.acompany.com/products/productgroup3/product25.htm for example.
Where in TYPO3 can such "shortcut" links be defined?
Most probably some page in the page tree has set type to: Shortcut which causes that it points some other page or resource, it's also possible that is set as Link to External URL and there is full URL given.
Check the page tree in the backend and find your coolproduct page in it. Then check the site's properties and change if required to other value/type.
It's also possible that this URL is generated by some plugin or TypoScript, but in this case you'll need to investigate it yourself.
Simplest way to find these kinds of things is actually using the search engine in the TYPO3 backend. You will find it in the upper right corner.
If this fails, what I do is install PhpMyAdmin from the extension repository. Once you have PhpMyAdmin you can use it's search functionality to find anything in the database using a search query of: '%coolproduct%' and selecting all tables. In the results look for the 'pid' field. It tells you on which page in TYPO3 the found item is located.
Does the page use the extension realURL? If so, there might be realURL redirects defined.
Have a look at page -> info -> RealUrl -> Redirects
Maybe you the user has defined this link redirection in many pages, you can search for it in the database exactly in the tt_content table.
You can set shortcut for your domain to any page of your site, so when user enter only your domain name in url then it redirects to page which you set in shortcut.
For that edit your domain and set shortcut to any page of your page tree.