can we restrict the path for smartimage or smartFile? Like when i drag an image from a specified path folder only in that case it gets added.
e.g. ddAccept and ddGroup
Not that I understood fully how smartfile works, but from what I see: nope, you can't restrict that in the out-of-the-box version of the widget. There are no hints about this functionality: neither in the documentation, nor in the source code (/libs/cq/ui/widgets/source/widgets/html5/form/SmartFile.js).
I recommend, you extend SmartFile / SmartImage and override #initializeDragAndDrop() to add your logic there.
as an alternate you can use the pathfield xtype to take image location (href) in dialog . and in the pathfield set the rootpath to your desired node
Related
Here is the issue:
Mkdocs use filename to build links.
However, users who update the doc often change the name of the files, as they use ordered titles (1 1 Introduction.md, 1 2 Main Content.md, ...)
Of course, they put links to other pages in their doc like this : (Introduction)[./1%201%20Introduction/#Paragraph2]
When they change the filename, the link ends up broken. Is there any way to link to another page#anchor without referring to filename and avoid broken link when changing file name? (Plugin, option in mkdocs, something I missed, ...)
Thanks in advance
I found the answer, and it was really obvious.
We don't use the nav property of the yml file to build the tree automatically and we could define it to avoid being dependent on file name for ordering.
Therefore, the filename could still not be modified but we can define the ordering in the nav property and rename the page title easily.
Obvious solution, but we missed it.
A Granite/Coral component PathField (granite/ui/components/coral/foundation/form/pathfield) provides a dialog box to select a path. Is it possible to set a default path to start from? I mean, something that can be changed by the user, not rootPath.
Have you considered using the value property? It's what the widget sets when you click through the content tree and select a page/resource. If you set this yourself in the dialog definition, the dialog should load with your path pre-set and allow the user to change it if necessary.
According to http://www.typo3-probleme.de/2018/07/11/typo3-sitemap-mit-typoscript-erstellen-2285/ I let TYPO3 V8.7.24 generate the sitemap.xml file. So far it works. But in the file there are not proper URL's. On every URLs end is "?type=500001", for example an URL looks like "https://www.domain.ch/angebot/online-marketing/?type=500001". As a side note , there is also Ext:Realurl in use.
My request is, how can you remove the segment "?type=500001" ? Is the reason typoscript or the extension Realurl? How can I analyse it?
Any hint is welcome. Thanks in advance for your help.
It's the link generation inside of TYPO3. that is configured by typoscript, so you could see typoscript as the culprit.
If you want to know whether realurl (or any other extension) is the culprit: disable the extension in mind. if the error is gone there is a reason to suspect this extension.
When links are generated by TYPO3 it holds some parameter to stay in the current context. Which paramaters should be considered is a configuration (so it is grounded in typoscript).
Have a look (TSOB) at config.linkVars in general (it is copied implicit to every page object) or of your page object page.config.linkVars (in your case: xml_sitemap.config.linkVars)
There is a note in the manual:
Do not include the type parameter in the linkVars list, as this can result in unexpected behavior.
Other option would be to explicit set &type=0 to every link. But don't forget to set config.uniqueLinkVars = 1 (or xml_sitemap.config.uniqueLinkVars = 1)
I want to perform a full text search but under a specific path and under pages that are Activated or Published only.
So if we find the text under /content/skynet/contact-us/jcr:content/content/slider/items and the page contact-us.html is not activated then this hit should be ignored
path=/content/skynet
type=cq:Page
group.p.or=true
group.1_fulltext=icon-phone
group.1_fulltext.relPath=jcr:content
property=cq:lastReplicationAction
property.value=Activate
p.limit=1
p.offset=0
Your property cq:lastReplicationAction would be on the cq:PageContent node and not on cq:Page. So giving a relative path to the property should fix your issue.
path=/content/skynet
type=cq:Page
fulltext=icon-phone
fulltext.relPath=jcr:content
property=jcr:content/cq:lastReplicationAction
property.value=Activate
p.limit=-1 //To display all the results
I found in typo3 admin side(/typo3), you can have two ways to set up TS,
you can set up through template->root, I think TS here will affect the whole site.
you can set up through template->certain page, it will only affect this page.
So my question is:
If I want to find where(which page) has TS setting such as : code = LIST, how could I do?
Use Web > Template module it has tools, you can for an example use Template Analyzer for the search
Try querying the database in phpMyAdmin or similar. The following looks in Template Setup:
SELECT pid, config, constants
FROM sys_template
WHERE config LIKE '%code = LIST%'
Replace config with constants to look in Template Constants. pid is the page ID.
If it is not set in the TypoScript, it perhaps has been set in the plugin itself. Just check the plugin content element itself.
In the Template module, go to the page where the setting is in effect.
Use the TSOB (Typo Script Object Browser) to search for "list":
This must show you all TS for this page that contains "list".
If you don't see the setting you can run a cmd/ctrl-F Search over the entire results.
You would have to search for "[code] = LIST".
Which will lead you to the following entry:
Hovering over the label will produce the above tooltip. Copy the line number.
Now change to the Template Analyzer. Here, you can click through all cascading templates and search for the line number:
This is definitely the line that sets that value.
From the "Template hierarchy" tree you will easily find the template that contains the setting.