After setting the flexform-settings I can use them on this page.
But after linking to another page using:
<f:link.action
pageUid="{settings.detailPid}"
action="show"
arguments="{object : object}">
linktext
</f:link.action>
... I do not have access to this settings anymore - so I loose the setting for 'backPid'.
How can I use {settings.backPid} in Detailview on Detailpage?
Edit: I would like to use the typoscript variables that are overwritten by flexformsettings.
You have to pass this settings into argument in your link viewhelper,
like
<f:link.action
pageUid="{settings.detailPid}"
action="show"
arguments="{object : object,backpid : settings.backpid}">
linktext
</f:link.action>
Hope this will help you.
Related
Problem
There is the requirement, to swap out the logo, based on a choice, the user makes on first visit. (Logo for internationals and logo for north America)
What I came up with
On fist thought this problem can be solved using a cookie. I implemented some javascript, to check and set the cookie if needed. This works fine so far but using javascript to change to logo isn´t the way to go and now I´m looking for possible solutions to this.
Some thoughts
If following the cookie approach, I´d need a way to swap out the template/partials, based on the cookie. Is there any way to do this using fluid or typoscript perhaps?
Maybe the cookie approach is the wrong way to handle this at all? Maybe this could be done (ab-)using the language selection or something like that?
Any help or ideas are appreciated.
Thanks!
First of all: Please use a question title that describes the problem more precise.
After setting the cookie with your javascript, you can set the logo to render in the TypoScript.
With a condition (https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Conditions/Index.html#request-getcookieparams) you can read the cookie parameter and set the logo depending on the cookie.
[request.getCookieParams()['logo'] == 'us']
lib.logoFile = pathToYourLogos/us.svg
[else]
lib.logoFile = pathToYourLogos/international.svg
[end]
Thanks to #thomas-löffler and #jonas-eberle for pointing out the right direction. Thomass solution is meant for Typo3 >= 9. This solution that worked for me on Typo3 ver. 8.7 (also see this solution):
Get the cookie value inside typoscript (setup) like this:
lib.requestedLocation = TEXT
lib.requestedLocation.data = global:_COOKIE|<cookie-name>
After getting the cookie value we can use it with fluid like this:
<f:variable name="location" value="{f:cObject(typoscriptObjectPath: 'lib.requestedLocation')}" />
<f:if condition="{location} == 'america'">
<f:then>
<img class="logo" src="/path-to-us-logo.svg">
</f:then>
<!-- defaulting to international if cookie is not set or somehting else is wrong -->
<f:else>
<img class="logo" src="/path-to-international-logo.svg">
</f:else>
</f:if>
I'm using TYPO3 7.6.2with the extension news(4.1.0) ... I'm showing the news tags at my detail page (own template : Resources/Private/Extensions/News/Templates/News/Detail.html).
At list view it's no problem to show & hyperlink a list of tags.
But not at detail view.I can show them but how can I link the seperate tags as well?
<f:for each="{newsItem.tags}" as="tag">
<f:link.page title="{tag.title}" pageUid="{tag.uid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
{tag.title}
</f:link.page>
</f:for>
The uidis wrong, see screenshot. How can I make a link from detail- to tag-list-view with the corresponding tag?
It just works with a page ID, which contains a news list:
<f:link.page title="{tag.title}" pageUid="{22}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
You use the uid as a page uid, thus gives you the wrong link.
You need to link to a page where you have a list of the news items with a certain tag :
<f:link.page title="{tag.title}" pageUid="{settings.mynewssettings.pageidoftaglist}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
I have modal jqxWindow
<div id='jqxwindow'>
<div>Header</div>
<div>Content <div id='jqxMyCheckbox'>CheckBox</div> </div>
</div>
and I want to post control values from this window by HTML method.
If i add Form tags to the window, the jqxwindow seems to stop exists.
Please advice on right approach - how to Post control values from jqxwindow form.
please note, I'm looking for compact way, using declared controls only in HTML preferably. If i implement JQuery $.post method, I need to declare variables and control names again. That makes implementation too complex.
I hope following post will be helpful to you
http://www.jqwidgets.com/submit-form-with-jqxlistbox/
In brief, try to assign 'name' property to some of jqWidgets you would like to include in post.
I have the code below to show a button in a overlay.
<div class="overlay22" id="overlay22" style="display:none;"></div>
<div class="box22" id="box22">
<input type="submit" value="Submit" class="buttonclick" id="buttonclick" />
</div>
Can we show the cq5 form in the overlay instead of hardcoding in the overlay?
If you are just creating some sort of basic form template or component, I think you should just stick to using regular HTML elements and then control look + feel with CSS. Though if you absolutely needed to use form elements similar to what you see in CQ's dialog windows, you will need to generate them by working with CQ's extension of the Ext JS framework.
For example, if you wanted to create a button analogous to your provided example, you'd have to write something like:
CQ.Ext.onReady( function(){
var button = new CQ.Ext.Button({
text : "Submit",
id : "buttonclick",
cls : "buttonclick",
renderTo : CQ.Ext.getBody(),
listerners : {
click : function(){
// Write handler code here
}
}
});
});
Widget API for latest version of CQ (5.5):
http://dev.day.com/docs/en/cq/current/widgets-api/index.html
Materials on Sencha Ext JS 3.4 (which I believe 5.5 is built on):
http://docs.sencha.com/ext-js/3-4/
We can do in the following way as well,
Say for instance we have a page with default cq5 form component already dragged in that,
Let that page be defined in this path as /content/geometrix/loginpage.html
Now we can show the above page in an overlay, using the below code
<div class="overlay22" id="overlay22" style="display:none;"></div>
<div class="box22" id="box22">
<sling:include path="content/geometrix/loginpage/par" />
</div>
Below that par we can find the contents of the form.Here box22 is the lightbox(pop up) and the overlay22 is the background div
I need to modify sitefinity's breadcrumbs from this:
Home
to this:
Home >
So if the breadcrumb is on the root page, it needs to have the > after it.
Im an absolute beginner, so go easy on me! (using version 3.7)
Regards
Peter
I had a similar problem in the past and solved it by creating a custom user control with the breadcrumb control embedded within it. this allows you to add your own custom logic in the code behind to show or hide things as necessary:
<%# Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>
<%# Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI" %>
<asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »
<sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />
here you can hide the BreadCrumb on the home page, showing the homepage hyperlink, which you can customize to show whatever you need.
There may be a better way to do this, but this was the fastest, easiest way I could figure out to do it.
hope this was helpful!
You can easily change the mockup separator. You need to edit the Breadcrumb, click on the advanced button and find the NodeSeparatorMarkup field.
In my case I've put >> instead of >
<span class='sfBreadcrumbNodeSeparator'>»</span>;