i want to read some data from the LocalConfiguration.
I don't found a way for fluid and for an ViewHelper.
I hope everyone can help me.
Thanks! :)
From experience I have learned that you should NOT use the class TYPO3\CMS\Core\Configuration\ConfigurationManager. It is considered internal and may not return the actual configuration (disregarding settings done in AdditionalConfiguration.php). See for example the discussion here.
Instead, access the data using the variable $GLOBALS['TYPO3_CONF_VARS'], e.g. use
echo $GLOBALS['TYPO3_CONF_VARS']['DB']['username'].
Ok - i have found a solution to read the LocalConfiguration File from TYPO3 with an ViewHelper.
$localConf = $this->objectManager->get('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager');
//Get Debug:
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($localConf->getLocalConfiguration());
Now you have the complete LocalConf. Array.
Related
We recently switched from tt_news to Georg Ringers News extension and I - as a novice typo3 coder - need help fixing some typoscript code that was used to trigger context specific searches using typolink.
The old snippet was
typolink.parameter = 649
typolink.useCacheHash = 1
typolink.additionalParams.current = 1
typolink.additionalParams.wrap = &tx_ttnews[swords]=|
The new parameter needs to be &tx_news_pi1 but swords does not work. I can't find documentation or examples how the search value can be set. I searched the code itself and dumb tried my luck with &tx_news_pi1[search]=| but that just shows the default numerical typo3 error "Oops, an error occurred! Code: 2018020814150924e87636" if something cannot be rendered. BTW: The referenced search result page works fine if called using the search form.
After grabbing through the code try &tx_news_pi1[overwriteDemand][search][subject]=|.
On the target list you need to allow overwriting of the demand in the plugin flexform!
The solution of Thomas works for me even without the [overwriteDemand] using the search result page as target. Thx.
typolink.parameter = 649
typolink.useCacheHash = 1
typolink.additionalParams.current = 1
typolink.additionalParams.wrap = &tx_news_pi1[search][subject]=|
I really would like to know how this could be grabbed from the code. :-) It seems that I have to learn more about php and the underlying data structure - [search][subject] looks like a kind of array which I didn't expect for that type of parameter.
I am using MkDocs, question I have is - I understand that within the documentation files I can say:
[My Link Name](My link URL)
But it's such a hustle when I want to change up my navigation or change up my keywords.
Can anyone suggest a plugin - At the point of building the documentation, automatically find keywords that would match up with keywords within the mkdocs.ymlfile and create a hyperlink to them.
Thanks in advance!
What you are describing, seems to be a primitive form of interwiki links. There is a plugin that you could use: markdown extra.
You could define your wikilinks, or wikilinks components in your mkdocs.yamlfile, like so, e.g.:
extra:
interwiki:
stackoverflow: stackoverflow.com/questions/
google: https://www.google.com/search?q=
Then you would use the "mustache" notation:
Please refer to the [question on StackOverflow]({{ interwiki.stackoverflow }}48173267)
Which would be equivalent to:
Please refer to the [question on StackOverflow](stackoverflow.com/questions/48173267)
I haven't tried it, but that would be the gist. Let me know.
Note that if all you want is to make links within a single web domain, MkDocs supports the standards extensions of python-markdown, hence also WikiLinks.
The syntax in the md file is a "double bracket":
Link to this [[full description]]
Which would become => https://your.website.com/foo/bar/full_description.html
According to the documentation, what you would have to do, is to specify in your mkdocs.yml file:
markdown_extensions:
- wikilinks:
- base_url: https://your.website.com/foo/bar/
- end_url: .html
Disclaimer: I haven't tried it yet, so anyone who has is welcome to correct me.
There's a simple way to add wikilinks to mkdocs by using the mkdocs-ezlinks-plugin.
Install the plugin:
pip3 install mkdocs-ezlinks-plugin
note that your OS may prefer pip instead of pip3
Add the following to mkdocs.yml:
plugins:
- search
- ezlinks:
wikilinks: true
The plugin does some really nice translation of links and searches the document tree for matching titles.
Link
Translation
[[Page Name]]
[Page Name](../folder2/page-name.md)
![[Puppy]]
![Puppy](../images/puppy.png)
[[Page Name|Link Text]]
[Link Text](../folder2/page-name.md)
[[Page Name#Section Heading|Link Text]]
[Link Text](../folder2/page-name.md#section-heading)
I have been working on creating appointments from Powershell in Outlook. Everything seems to be working with the exception of being able to set the appointment.RTFBODY. It looks like it is stored as a byte array, but despite my best efforts and many attempts I have been unable to set it. Any suggestions would be much appreciated.
http://pastebin.com/kQvGfNRS
Edit: I was able to find what could be a similar issue. https://social.msdn.microsoft.com/Forums/sqlserver/en-US/5dba0d12-94e8-47a5-b082-93d3693e2a47/cant-set-the-rtfbody-of-an-appointmentitem
"I assume you add a wrong version reference. If you add Microsoft.Office.Interop.Outlook 12.0, I could reproduce your issue. I suggest you remove this reference, and add Microsoft.Office.Interop.Outlook 14.0."
Also found this: Outlook AppointmentItem - How do I programmatically add RTF to its Body?
from the link in your question - "it is just a known problem in OOM - setting the RtfBody property using early binding works. Setting through IDispatch::GetIDsIfNames / Invoke does not."
Powershell always uses late bindings (i.e. you cannot declare a variable as an instance of a particular object. e.g. AppointmentItem).
i am wondering what TS code is needed to set path to my own indexed search local_lang.
I changed what i needed in pi1/local_lang but i would like to set it to my own so i can have the edited (Croatian in this case) for future projects.
Something like:
plugin.tx_indexedsearch.templateFile = fileadmin/search_temp.html
but for Local_lang of it?
with this lines you can overwrite individual translations:
plugin.tx_myPlugin_pi1._LOCAL_LANG.de.key = value;
plugin.tx_myPlugin_pi1._LOCAL_LANG.en.key = value;
I think that not all extensions supports a complete own localLang file, but not 100% sure.
You could add your translation to the official Translation Server . So your translation will be available trough the Translation Modul in TYPO3 Backend.
The croation translation for indexed_search is managed there: http://translation.typo3.org/hr/TYPO3.TYPO3.core.indexed_search/
There is a single-sign-on with typo3.org implemented. So you need an account on typo3.org first.
Ok...I give up :)
What is the best way to select values out of a GWT Suggest Box using
WebDriver? I'm using FirefoxDriver, and so far nothing seems to pick
values out of a GWT suggestBox...not sendKeys, not selenium.keyUp,
anything.
I've even tried executing javascript directly to get those values to populate, like this (to no avail):
((JavascriptExecutor) driver).executeScript("document.getElementById('spSelect').value='verizon'");
Is there a better
way? If not, what is the "best" way to get values out of a GWT suggest
Box?
Many thanks in advance.
Cheers
Pedro
Ok, we've figured out our problem.
We were setting explicit IDs on our elements, so our tests can grab
them easier. In GWT this is done via:
usernameLabel.getElement().setId("consoleLoginPageUserNameInput");
This works fine for most GWT inputs, but for the SuggestBox it is
handled a bit differently:
spSelect.getElement().getElementsByTagName("input").getItem(0).setId("spSelect");
After grabbing the correct inner table, we are able to interact with
this input with Selenium just fine. Hope this helps someone.
Cheers
Pedro
Try this javascript (from here):
To set the value:
document.getElementById("spSelect")["value"] = "verizon"
To retrieve it:
var value = document.getElementById("spSelect")["value"];