does anyone know if nested conditions are possible in Typo3>9.4?
I didn't find anything in the internet or in the documentation of the site itself.
Currently I try it like this:
[2 in tree.rootLineIds]
[applicationContext == "Development"]
[loginUser('*') && page["uid"] in [13]]
....
[end]
[end]
[end]
But it seems not to work. Does anyone have a tip for me? I would be very grateful for it.
Nesting of TS Conditions is IMO still not possible (Haven't found anything about it in the docs - neither that it works nor that it doesn't work).
Maybe combining conditions can help you.
Related
I moved a shop from xtc:modified to shopware.
The URLs look almost the same:
http://example.com/category/article::123.html
http://example.com/category/article
The only difference is ::123.html, 123 being different numbers.
Could you please provide me with the correct rewrite code to get rid of the :: and everything behind it?
I can't find the solution...
Thanks!
OK, so I did figure it out after a couple of more hours of trial and error:
RedirectMatch permanent (.+?)::.+$ https://www.example.com$1
i need to redirect with variables and i have no idea how to start, it would be great if you can support me, because i'm new to this.
from: */wp-content/uploads/[VAR]to: http://www.test.com/main/wp-content/uploads/[VAR]
*/ = everything in front of /wp-content
[VAR] = variable
thank you in advance for your help.
Use the below regex for matching:
\*
And replace it with:
http://www.test.com/main
I've no idea of how to do this with .htaccess, but I think you may know about this ;)
I've written this short piece of php code that requires 2 variables name and id, now the code itself works as intended and is not my problem, the problem is that I want to shorten the link to this file from 'http://www.mypage.org/folder/index.php?name=name&id=0' to 'http://www.mypage.org/folder/name;0', like so:
RewriteRule ^([a-zA-Z0-9]+);(.*)$ index.php?name=$1&id=$2
But if someone enters a link like 'http://www.mypage.org/folder/name' with out the ';' separator they get a 404 page.
Is there a way to write a sort of if statement that also checks for links with out the ';'?
The php page can handle a missing id by defaulting to '0' as well as a missing name.
Thanks in advance!
Make ;0 part or URL optional:
RewriteRule ^([a-zA-Z0-9]+)(?:;(.*))?$ index.php?name=$1&id=$2
or like this (if the above does not work in Apache)
RewriteRule ^([a-zA-Z0-9]+)(;(.*))?$ index.php?name=$1&id=$3
By default, the wayfinder plugin in modx revo should sort by menuindex. This doesn't seem to work. I have the following:
[[!Wayfinder? &startId=`2` &level=`1` &ignoreHidden=`TRUE` &outerClass=`news` &sortBy=`menuindex` &sortOrder=`DESC`]]
I suspect it's something stupid I overlooked...
EDIT: I've made it work now.
I looked into the wayfinder code in wayfinder.class.php. The following line was commented out:
$c->groupby($this->modx->getSelectColumns('modResource','modResource','',array('id')));
It happened because of the following comment in the code:
/* not sure why this groupby is here in the first place. removing for now as it causes issues with the sortby clauses */
Maybe this will help someone in the future.
I looked at the wayfinder code in wayfinder.class.php The following line was commented: $c->groupby($this->modx->getSelectColumns('modResource','modResource','',array('id')));
It was commented out because of the following comment in the code:
/* not sure why this groupby is here in the first place. removing for now as it causes issues with the sortby clauses */
Maybe this helps anyone in the future
I am using htaccess. I try to pass a value in url like 'C++'.
like "http://domain.com/Details/c++/detail.html"
I am retrieving the value in htaccess like
RewriteRule ^Details/([a-zA-Z_0-9_.,'&/-]+)/(([a-zA-Z_0-9_.,'&/-]+).html)$ index.php?page=$2&id=$1
But it returns only 'c'. Symbol '+' not accepted. I need the the value 'c++'.
Is there any solution?
Try Url encoding the + character.
"http://domain.com/Details/c%25%25/detail.html"
Is it possible to escape it, like http://domain.com/Details/c%25%25/detail.html. (I'm only guessing)
http://domain.com/Details/c%2B%2B/detail.html
A small consolation is: you are not alone. Since this problem is by design in URIs, eben big sites like Google have their problems with it:
http://www.google.com/search?q=c++
This does a search for just ācā.
Try it with the B flag:
RewriteRule ^Details/([a-zA-Z0-9_.,'&/-]+)/([a-zA-Z0-9_.,'&/-]+\.html)$ index.php?page=$2&id=$1 [B]