Answer the question
In order to leave comments, you need to log in
How to generate ALIAS from MENUTITLE instead of PAGETITLE in MODX REVO?
Friends, please tell me if there is a solution, a setting in MODX REVO, so that alias would be created from the menutitle, and if the field is empty, then from the pagetitle. How to do it? The fact is that pagetitles are always huge, they are written for SEO, and the content is so complex, when translit works, it turns out to be a slightly different name that is simple in meaning that I would like, but in the menutitle I always write a short and simple name for the menu. I would like to take the title for the aliasa from it, and if it is empty, then, as usual, from the pagetitle. Any solutions?
I have a plugin for the OnDocFormSave event and it works.
if ($modx->event->name == 'OnDocFormSave') {
if (!empty($resource->get('menutitle'))) {
$resource->set('alias',$resource->get('menutitle'));
}
else {
$resource->set('alias',$resource->get('pagetitle'));
}
$resource->save();
}
if ($modx->event->name == 'OnDocFormSave') {
if (empty($resource->get('alias'))) {
if (!empty($resource->get('menutitle'))) {
$resource->set('alias',$resource->get('menutitle'));
}
else {
$resource->set('alias',$resource->get('pagetitle'));
}
$resource->save();
}
}
Answer the question
In order to leave comments, you need to log in
Div to which the background is a picture,
Create a pseudo to which you create a black background with transparency, large in the size you need
Position it on the left edge, transform the rotation by the required number of degrees
On the parent overflow hidden overflow: hidden;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question