I successfully configured the sitemap of my TYPO3 v10 project within the plugin SEO and added custom configurations in my templatesetup.ts with the official TYPO3 docs:
plugin.tx_seo {
config {
xmlSitemap {
sitemaps {
pages {
provider = TYPO3\CMS\Seo\XmlSitemap\PagesXmlSitemapDataProvider
config {
excludedDoktypes = 3, 4, 6, 7, 199, 254, 255
additionalWhere = no_index = 0
}
}
}
}
}
}
Here you can see a few lines of my sitemap.xml:
My goal is, to remove all the lines with just the root "/". How can I set another rootId for my sitemap.xml other than 1?
Thanks for your help.
You need the parameter rootPage. Unfortunately it's undocumented (yet).
So your TypoScript should look like this:
plugin.tx_seo {
config {
xmlSitemap {
sitemaps {
pages {
provider = TYPO3\CMS\Seo\XmlSitemap\PagesXmlSitemapDataProvider
config {
excludedDoktypes = 3, 4, 6, 7, 199, 254, 255
additionalWhere = no_index = 0
rootPage = 135
}
}
}
}
}
}
Related
I am new to Neoviim. So, I am currently using Astronvim and I have setup flutter-tools plugin by following the guide here.
Whenever I open a dart file I get the following error: dartls -32007 file is not being analyzed
Autocompletion and Fluttter commands works, but some feature like color highlights and goto definitions stops working in a dart file sometimes.
My config look like this:
return {
lsp = {
skip_setup = { "dartls" }, -- skip lsp setup because flutter-tools will do it itself
["server-settings"] = {
dartls = {
-- any changes you want to make to the LSP setup, for example
color = {
enabled = true,
},
settings = {
showTodos = true,
completeFunctionCalls = true,
},
},
},
},
plugins = {
init = {
{
"akinsho/flutter-tools.nvim",
requires = "nvim-lua/plenary.nvim",
after = "mason-lspconfig.nvim", -- make sure to load after mason-lspconfig
config = function()
require("flutter-tools").setup {
lsp = astronvim.lsp.server_settings "dartls", -- get the server settings and built in capabilities/on_attach
}
end,
},
},
},
}
TYPO3 11.5.2
I want to display felogin using typoscript with a customized template at position:
<f:cObject typoscriptObjectPath="lib.loginBox" />
The original template should be used if felogin is added as a page content element.
The following code works, but changes the view for all felogins:
plugin.tx_felogin_login {
settings.pages = 15
view {
templateRootPaths {
0 = fileadmin/template/current/felogin/Resources/Private/Templates/
10 = {$plugin.tx_felogin_login.view.templateRootPath}
}
}
}
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
}
To apply different templates for 1) and 2) I thought the following could work, but it doesn't:
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
settings < plugin.tx_felogin_login.settings
settings.pages = 15
view < plugin.tx_felogin_login.view
view {
templateRootPaths {
0 = fileadmin/template/current/felogin/Resources/Private/Templates/
10 = {$plugin.tx_felogin_login.view.templateRootPath}
}
}
}
EDIT: the second version does not use the custom template at all and the settings.pages = 15 doesn't work => no login possible. With the first version login is working.
Any hints what's wrong with this approach?
How I can achieve different templates for 1) and 2) ?
Edit: Solution as it works for me now:
plugin.tx_felogin_login {
settings.pages = 15
}
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
view < plugin.tx_felogin_login.view
view {
templateRootPaths {
10 = {$plugin.tx_felogin_login.view.templateRootPath}
#20 = fileadmin/template/current/felogin/Resources/Private/Templates/
#should be something like:
20 = EXT:myfelogin/Resources/Private/Templates/
}
}
}
Problem is the sorting of your templates!
lib.loginBox = USER
lib.loginBox {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = Felogin
pluginName = Login
settings < plugin.tx_felogin_login.settings
settings.pages = 15
view < plugin.tx_felogin_login.view
view {
templateRootPaths {
10 = {$plugin.tx_felogin_login.view.templateRootPath}
20 = fileadmin/template/current/felogin/Resources/Private/Templates/
}
}
}
As 20 is higher than 10, the template in fileadmin will be used.
Just as side note: you should always create a site package extension containing all those files and not put them into fileadmin.
I do not have fixed number of tabs in my app page, so that using *ngFor in ionic2-super-tabs tag to get dynamic tabs as mentioned in below ts and html.
typescript :
import { AustraliaPage } from './australia';
import {CanadaPage} from './canada';
export class CountryPage {
Australia = AustraliaPage;
Canada= CanadaPage;
tabsLoaded = false;
ionViewDidLoad() {
this.testservice.getCoutrynames().subscribe(countries => {
this.tabs = countries;
// below is the output data of getCoutrynames() method
// "countries": [
// {
// "country_id": 1,
// "countryName": "Canada"
// },
// {
// "country_id": 2,
// "countryName": "Australia"
// }
// ]
this.tabsLoaded = true;
})
}
}
HTML :
<super-tabs scrollTabs="true" *ngIf="tabsLoaded">
<super-tab *ngFor="let tab of tabs" [root]="tab.countryName" title="tab.countryName"></super-tab>
</super-tabs>
But getting a below error.
Runtime Error
Uncaught (in promise): invalid link: Australia
Any help would be greatly appreciated.
You are setting the root to the string 'Australia' not the Australia object/page. Do something like this:
pages = {
Australia: AustraliaPage,
Canada: CanadaPage,
...
};
<super-tabs scrollTabs="true" *ngIf="tabsLoaded">
<super-tab *ngFor="let tab of tabs" [root]="pages[tab.countryName]" title="tab.countryName"></super-tab>
</super-tabs>
all at once today I could not build app neither iOS nor Android. I developed by using Corona Sdk 2014.2511. For both platform I get "Runtime Error":
iOS:
module Facebook not found: resource (facebook.lu) does not exist in archive
no field package.preload["Facebook"]
no file "/private/var/mobile/Containers/Bundle/Application/...and so on
Android
/Users/jenkins/slaveroot/workspace/label/android/platform/resources/init.lua:820module "Facebook" not found. resource (Facebook.lu) does not exist in archive
no field package preload...etc
Apparently bot errors depend on Module Facebook! I really don't know what to do. Just followed suggestions from the web and modified file build.settings as follows:
settings =
{
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = "portrait",
supported = { "portrait", }
},
excludeFiles =
{
-- Include only the necessary icon files on each platform
iphone = { "Icon-*dpi.png", },
android = { "Icon.png", "Icon-Small-*.png", "Icon*#2x.png", },
},
plugins =
{
["CoronaProvider.native.popup.social"] =
{
publisherId = "com.coronalabs"
},
},
{
["facebook"] =
{
publisherId = "com.coronalabs"
},
},
--
-- iOS Section
--
iphone =
{
plist =
{
UIStatusBarHidden = false,
UIPrerenderedIcon = true, -- set to false for "shine" overlay
--UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend
UIAppFonts = { "RepriseStamp.ttf", "REPRISESTAMP.dfont"},
CFBundleIconFiles =
{
"Icon.png",
"Icon#2x.png",
"Icon-60.png",
"Icon-60#2x.png",
"Icon-60#3x.png",
"Icon-72.png",
"Icon-72#2x.png",
"Icon-76.png",
"Icon-76#2x.png",
"Icon-Small.png",
"Icon-Small#2x.png",
"Icon-Small#3x.png",
"Icon-Small-40.png",
"Icon-Small-40#2x.png",
"Icon-Small-50.png",
"Icon-Small-50#2x.png",
},
{
UIApplicationExitsOnSuspend = false,
FacebookAppID = "5XXXXXXXXXX", --replace XXXXXXXXXX with your Facebook App ID
CFBundleURLTypes =
{
{ CFBundleURLSchemes = { "fb5XXXXXXXXXX", } } --replace XXXXXXXXXX with your Facebook App ID
},
["URL types"] =
{
item =
{
["URL Schemes"] = { ["Item 0"] = "fb5XXXXXXXXXX" }, --replace XXXXXXXXXX with your Facebook App ID
},
},
}
}
},
--
-- Android Section
--
android =
{
usesPermissions =
{
"android.permission.INTERNET",
},
},
}
Unfortunately nothing changed. I have been getting always the same errors. Any help? thanks a lot! Ubaldo
You have an error in your build.settings.
plugins =
{
["CoronaProvider.native.popup.social"] =
{
publisherId = "com.coronalabs"
},
["facebook"] =
{
publisherId = "com.coronalabs"
},
},
I am implementing caching for my website which is using Zend Framework.
I look into the source code and see that:
Zend_Cache::factory()
always need two configurations of backend and frontend.
And my issue is:
I don't know why backend is set inside frontend,
and what is the difference between them?
$frontendObject->setBackend($backendObject);
return $frontendObject;
Here is the orginal source code:
public static function factory($frontend, $backend, $frontendOptions = array(), $backendOptions = array(), $customFrontendNaming = false, $customBackendNaming = false, $autoload = false)
{
if (is_string($backend)) {
$backendObject = self::_makeBackend($backend, $backendOptions, $customBackendNaming, $autoload);
} else {
if ((is_object($backend)) && (in_array('Zend_Cache_Backend_Interface', class_implements($backend)))) {
$backendObject = $backend;
} else {
self::throwException('backend must be a backend name (string) or an object which implements Zend_Cache_Backend_Interface');
}
}
if (is_string($frontend)) {
$frontendObject = self::_makeFrontend($frontend, $frontendOptions, $customFrontendNaming, $autoload);
} else {
if (is_object($frontend)) {
$frontendObject = $frontend;
} else {
self::throwException('frontend must be a frontend name (string) or an object');
}
}
$frontendObject->setBackend($backendObject);
return $frontendObject;
}
The cache backend is the "cache engine" : it can be file, memcached, etc.
The cache frontend specify what kind of data will be stored in the cache (see http://framework.zend.com/manual/1.12/en/zend.cache.frontends.html)