Is it somehow possible to force a no_cache link with tx_news?
<n:link newsItem="{newsItem}" settings="{no_cache:1}" uriOnly="1"/>
The link should look like this:
http://domain.com/no_cache/articleurl
If you want to disable caching for your news item, you can set the no_cache on your page.
you can also take a look at the viewhelper class of tx_news to see if this is possible. If not, you can add an additional parameter yourself
Related
I want to use a Powermail marker as a href in the RTE at the submit Page.
I.e. myText
How can I solve this?
You must enable HTML within RTE.
See option misc.htmlForHtmlFields at docs.
After that it should be possible to use your code or fluid link viewhelper e.g.
<f:link.typolink parameter="{themarker}">the Text</f:link.typolink>
How can I create a fluxfield to create a link to another page, where the user can chose the page in a pagetree. Something like the Modify Linkfrom the RTE. Is there something?
Or how else would I create a field for a internal link? Just an inputfield where the use can input the PageID is not enough.
One more step would be a field where the user can input an internal link OR an external link.
Have not found any good solution for this problem yet. How do you do it?
You can use a normal text input, but add a link wizard to it. Looks like this:
<flux:field.input
name="link"
label="Link!"
>
<flux:wizard.link/>
</flux:field.input>
To output the link, use one of the ViewHelpers v:(link|uri).typolink from EXT:vhs:
<v:link.typolink configuration="{parameter: link}">
Linktext
</v:link.typolink>
This works for all kinds of links.
I know it's possible to create blog-wide meta-if boolean variables in Tumblr themes (e.g. {block:IfNotReversePagination}), but it is it possible to do something similar for individual posts?
For instance:
I'd like to be able to create several different widths for Photo posts, and it seems that the easiest way to do that would be to have a checkbox in the Edit screen for a post, labeled Wide Photo or something similar, that I could use to add a class in the theme markup.
Is this possible? If not, is there another way to accomplish something similar?
On a per-post basis you can enter a tag to the post. Say you enter widephoto as a tag on a post you can use the {TagsAsClasses} template tag on your posts to check it.
<article class="{TagsAsClasses}"></article>
If you don't want the tag showing up in the tag listing for the post you can remove it via JS (though it will still show up in the Tumblr Dashboard).
I'm trying to place a link on the submit page of my powermail setup.
You'd think this is a simple task, but bear with me.
My Powermail form has 2 hidden fields which are prefilled with a page ID and a page title.
These belong to the page I later want to return to, after having sent the mail. By putting these values in the form, I hoped to have access to them whenever I need them in the process.
I prefill these hidden fields from TypoScript like so:
plugin.tx_powermail {
settings {
setup {
prefill {
// Hidden "back to" page ID. This is the page you may want to return to after sending a mail.
backto = TEXT
backto.data = GP:backTo
backto.if.isTrue.data = GP:backTo
backtotext = TEXT
backtotext.noTrimWrap = |Back to ||
backtotext.data = GP:title
backtotext.if.isTrue.data = GP:title
backtotext.htmlSpecialChars = 1
}
}
}
}
1. Approach
Given that Powermail claims you can now use Fluid ViewHelpers in your content sections, I though, great, let's use the PageViewHelper, like so:
{f:link.page(pageUid:'{backto}')}
But where does my link text go? More inline notation to the rescue!
{backtotext -> f:link.page(pageUid:'{backto}')}
Rendered Result
Seems like the inline notation is not fully supported. I thought I was smart by simply using:
{f:link.page(pageUid:'{backto}')}{backtotext}
But this leaves the <a> tag open, which has very undesirable effects...
So - No link for me!
2. Approach
So I thought I would simply construct the link in TypoScript and render it on the page via
{f:cObject(typoscriptObjectPath:'lib.myBackLink')}
But I can't see any way to access the variables from the (sent) Powermail form in TS. So I don't have access to the page ID or title.
3. Approach
So I thought, if the default PageViewHelper only wants to render its children as its content, maybe I can roll my own ViewHelper that accepts the content as a parameter!
But how would I make that ViewHelper known to the system so that I can use it in my customized Powermail templates?
I've only used Fluid inside of my extensions before. It was obvious how Fluid would look up the correct ViewHelper by name, by what if I want to use a ViewHelper in my fileadmin folder hierarchy?
4. Approach
So, why not just use a normal link by using {backtotext} in the RTE?
TYPO3 realizes, that that is an illegal reference, and quickly turns the link into:
And the resulting output will simply not be a link.
So, that doesn't work either.
OK, so I change the target to {backtotext} (removed a slash). Now the URL is no longer recognized as internal and is marked with data-htmlarea-external="1". This causes my link to actually be fully evaluated and rendered (yay).
But it is now treated like an external link, RealURL no longer affects it and it is subject to external link _target behavior.
Why is this so difficult? What am I not understanding?
In RTE you have to use <link ###pageid###> instead of <a href="...">.
Have a look into the RTE DB field contents (or hit the no RTE checkbox) on how to use the link elements.
As it turned out, none of the previously attempted solution actually worked.
To get things over with, I just replaced the web section in the PowermailAll template, like so:
Section for Web view
<f:section name="web">
</a>
</f:section>
And then I used the following in my Submit Page content:
{f:link.page(pageUid:'{backto}')}{backtotext}{powermail_all}
Problem solved. I guess...
I have a fb:like tag with href="http://www.example.com/page.php?id=1", and for some reason, and only for some of the pages, clicking on like results in liking http://www.example.com.
What could be the cause?
The meta tag og:url would be the one you need to pay attention to, or if you did define data-href, take a look at it in the plugin html5 code.