content_fallback works for a content element but not for menus - typo3-6.2.x

I have the similar problem like this but this didn't helped me. I am using TYPO 3 CMS 6.2.14. My aim is to change any page content with a certain language (lets say chinese) to English (id=1) if it is not translated (i mean if the content is not translated to chinese). My default language is german. With 'content_fallback', content elements is working fine(means contents are translated to english: see attached screenshot) but not the menu. It always change to default (German). So far the code is like this :
#Sprache- Chinesisch
[globalVar = GP:L = 11]
config {
sys_language_uid = 11
language = cn
locale_all = cn_CN.UTF-8
htmlTag_setParams = lang="cn"
sys_language_mode = content_fallback; 1,0
sys_language_fallBackOrder=1,0
}
[global]
Thank you in advance.
Sandeep

Well I figured out the solution. I got this extension which helped me.
Anyway Thanks

Related

Can PDF notes/annotations include links to other pages in the PDF?

I want to add an annotation to a PDF page (i.e. something that would show as a pop-up note or appear in the list of notes for the current page).
And in that note, I want to say "See page 93", where clicking on that takes the user to page 93.
Is that possible? It seems like a useful feature, but I haven't been able to find any examples.
And if so, can it be done with Apache PDF Box?
Yes (it is possible) and yes (it can be done with PdfBox). That question has been asked before and answered several times. Read the follwing answer here and the see the full code here.
try ( InputStream resource = getClass().getResourceAsStream("some.pdf")) {
PDDocument document = Loader.loadPDF(resource);
PDPage page = document.getPage(1);
PDAnnotationLink link = new PDAnnotationLink();
PDPageDestination destination = new PDPageFitWidthDestination();
PDActionGoTo action = new PDActionGoTo();
//destination.setPageNumber(2);
destination.setPage(document.getPage(2));
action.setDestination(destination);
link.setAction(action);
link.setPage(page);
link.setRectangle(page.getMediaBox());
page.getAnnotations().add(link);
document.save(new File("RESULT_FOLDER", "output-with-link.pdf"));
}
Other answers are here and here.

TYPO3: variables not working

Using variables in T3 aren't working.
I actually just copied the snippets from a working site.
TS:
page.10 = FLUIDTEMPLATE
page.10.variables {
content < styles.content.get
content.select.where = colPos=0
info < styles.content.get
info.select.where = colPos=1
}
Inside the HTML template:
<f:format.html parseFuncTSPath="">{info}</f:format.html>
<f:format.html parseFuncTSPath="">{content}</f:format.html>
The template is being included, added a random <hr/> to make sure changes are displayed in the FE.
Dummy content is inserted in the correct columns in the BE (colPos 0 & 1).
Also tried it without the <f:format.html> and with a <f:format.raw>.
EDIT: Well, even though it's obvious, I also made sure I'm on the correct page (uid=2).
Can anyone help? Thanks.
I'm running T3 7.6.9
Well, I knew it was somewhere obvious:
I forgot to include the fluid_styled_content includes.

Make Text Field item as Read Only in APEX 5.0

I have some text field page items on my APEX 5.0 page and I want to make the textboxes as read only/non-editable. During the page load I want to use these text boxes for only the data display on the page and should be non-editable.
Can somebody advice on how to do that? What attributes need to set for this?
This answer is a bit late to the party, but I found myself confronted to this problem and I wanted to share the solution I came up with.
In fact you just need to create your item as a text area, let say P1_Text_Area and you give it a readonly attribute using JavaScript. Write thoses 2 lines in the "Function and Global Variable Declaration" of your page:
var disItem = document.getElementById('P1_Text_Area');
disItem.readOnly = true;
Hope this helps someone in need.
in item properties find the
Read Only group
and set Read Only Condition Type as Always
or the option that suits to you
You can use disabled + save session state ==> read only

Opencart shows variable instead text

my store suddenly starts to show just the variables, instead the text of the variable.
i already check the controller, and it looks okay.
the footer shows like this:
text_address
text_address_cnt
and the content of theses variables is
$_['text_address'] = 'Endereço';
$_['text_address_cnt'] = 'Endereço da sua loja';
the controller looks like:
$data['text_address'] = $this->language->get('text_address');
$data['text_address_cnt'] = $this->language->get('text_address_cnt');
anyone went through this?
ps: store version 2.0.2
I made a new store and works ok... Still don't know why this has happened.

What is the functioning of fireevent() in HP QTP / UFT?

I am learning HP UFT.
Recently I came across fireevent and I tried to implement it on the website of Flipkart. I was trying to use firevent("onmouseover") for the link Men on the homepage of the website.
I used ChildObjects to find out the Link and WebElement (in two different tests), first Highlighted it and then used object.fireevent("onmouseover") as well as object.fireevent("OnClick"). The OnClick is working and it is showing the link as selected (i.e. the dotted box covering the link when we press tab), but it is not showing the Menu Under Men Section.
I had googled and bingged a lot. But was unable to find the exact working of FireEvent in QTP/UFT.
Please Help me solving the above problem as well as some tutorials on FireEvent.
EDIT: I am using IE 11 for testing.
Motti has already answered the technical definition, but I shall attempt to give you a solution to your functional issue.
In my experience .FireEvent often doesn't work as you would expect. An alternative for something like onmouseover is to simulate user behaviour a bit more closely by actually moving the mouse to the desired location. In our framework we have a little extension function to do just that, a pared-down version of which is shown here:
Sub My_MouseOver(objSender)
Dim absX : absX = objSender.GetROProperty("abs_x")
Dim absY : absY = objSender.GetROProperty("abs_y")
Dim width : width = objSender.GetROProperty("width")
Dim height : height = objSender.GetROProperty("height")
Dim x : x = (absX + (width / 2))
Dim y : y = (absY + (height / 2))
Dim deviceReplay : Set deviceReplay = CreateObject("Mercury.DeviceReplay")
deviceReplay.MouseMove x, y
Reporter.ReportEvent micDone, "A step name", "A useful step description"
End Sub
RegisterUserFunc "Link", "MouseOver", "My_MouseOver"
RegisterUserFunc "WebButton", "MouseOver", "My_MouseOver"
RegisterUserFunc "WebElement", "MouseOver", "My_MouseOver"
As an example you can then do as follows to bring up the "ELECTRONICS" menu overlay on flipkart.com (obviously substitute your own Browser and Page definitions):
Browser("Flipkart").Page("Main Nav").Link("xpath:=//a[#data-tracking-id='electronics']").MouseOver
In the original version there's various extra bits of error handling and custom reporting so it tells you what you clicked on, but the essence is the same. It locates the object on screen, calculates the centre and moves the mouse there. You might want to wait a small amount of time for the menu overlay to appear after doing so before calling .Click on one of the newly-displayed sub-elements.
I found a solution to my problem and it is working perfectly.
Setting.WebPackage("ReplayType") = 2
object.FireEvent "onmouseover"
Setting.WebPackage("ReplayType") = 1
In this case, the object will be:
Browser("name:=Online Shopping.*").Page("name:=Online Shopping.*").Link("innertext:=Men")
I have tried this and it is working fine. I guess, we do not need any alternatives. But I really don't know is, Ctrl+Space is not working for this in UFT. Don't know the reason.
This actually depends on what browser you're using.
Warning: There are exceptions to the information presented in this answer and it also may change in the future. The answer is meant to give a basic understanding but don't depend on it to be true without checking the behaviour for your specific version/use-case.
Originally QTP's FireEvent was supposed to call IE's non-standard fireEvent method.
On Firefox and Chrome this is implemented using the standard dispatchEvent. You should check which events the web site expects to get.
Things get complicated if you mix the event models (the standard DOM level 2 and Microsofts) as explained in this blog post.