beardcoder / sitemap_generator Goto Github PK
View Code? Open in Web Editor NEWEasy to use #TYPO3 #CMS Sitemap Generator.
Home Page: http://typo3.org/extensions/repository/view/sitemap_generator
License: MIT License
Easy to use #TYPO3 #CMS Sitemap Generator.
Home Page: http://typo3.org/extensions/repository/view/sitemap_generator
License: MIT License
Extension description suggest it is possible to add custom record types to extension, but there is no example in the documentation for this.
Thanks for this great extension, it works pretty.
One thing is missing for most cases, I think,
why not add a possibility to define additional fields not as db field but as plain text ?
In current situation we need to extend each db table of each installed extension to get for example changefreq,
why not simplify that by allow to set additional fields as simple text, for example:
news {
changefreq = daily
priority = 0.7
}
Please take into consideration to add option like that.
I think it would be a great feature if the extension could generate an image sitemap for Google Search Console. Is it possbile to implement it in a future version of the extension?
Installing the extension via extension manager (t3x upload) fails with a PHP Warning:
PHP Warning: trim() expects parameter 1 to be string, object given in typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php line 294
PHP 5.6.9
TYPO3 7.6.2
Currently the priority value is set with a comma:
<priority>1,0</priority>
but it need to be a dot:
<priority>1.0</priority>
Currently it results to errors in google search console. See also http://www.sitemaps.org/de/protocol.html
SitemapRepository.php
It think this is the problem: sprintf('%01.1f', $page['sitemap_priority'] / 10)
and the setlocale()
of the server.
-> $urlEntry->setPriority(number_format($page['sitemap_priority'] / 10, 1, '.', ''));
I would like to build the additionalWhere
statement dynamically. It would be great, if I could configure it as stdWrap or cObject and define a postUserFunc
.
Trying to see some news will result in
Fluid parse error in template Sitemap_action_googleNewsList_35fce49a775b7f9eab7ff40682dc5b9317260cde, line 1 at character 1. Error: Unkown Namespace: <news:news> (error code 0). Template source chunk:
News version 6.0.0
hy,
did you tested it with the above configuration? the urls at the sitemap will be like
http://xxx.test.com/index.php?id=2
instead of
which is working in a simple menu.
(the filename generation for sitemap.xml and sitemap_news.xml within the RealUrl configuration is working well)
We had the issue that many pages with many columns resulted in HUGE cache entries which could not be saved into MySQL database (in particular: max_allowed_packet size issue). Our simple solution would be to make '*'
as argument to $this->pageRepository->getMenu()
within \Markussom\SitemapGenerator\Domain\Repository\SitemapRepository::getSubPages()
configurable. By just taking the columns really needed, the result set is way smaller.
Support for PHP 7.3 would be nice. Without checking, most likely there is not much that needs to be changed apart from specifying different requirements in ext_emconf.php and composer.json?
Not sure if this is the best place for this but I have a question.
I have version 0.8.1 in a typo3 7.6.11 site, if the page is a shortcode, it doesn't get added to the sitemap, nor do any of the subpages.
Is there a way around this?
Great extension btw! Works great with tx_news.
Avoid variables with short names like $ch. Configured minimum length is 3.
When a page ist set to "Hide default translation of page" the page should not be listed in the sitemap.xml of the default language, but still appear in the sitemap.xml of the translation.
At the moment, the setting is ignored.
The parameter xmlSiteUrl
is currently configurable via the scheduler argument. In multi-stage environments (local, dev, stage, prod) this is not useful, as the data gets overridden by deployment.
It should be able to store the value of the argument in a environment specific configuration file and will be read from there at runtime. I think about a 2-step configuration:
hy,
i think there is a little mistake at the Introduction section:
Wrong:
plugin.tx_sitemapgenerator.urlEntries.pages {
hideIfNotTranslated = 1
}
Correct:
plugin.tx_sitemapgenerator.urlEntries.pages {
hidePagesIfNotTranslated = 1
}
If a mount point is used and correctly configures all subpages of the mounted page should be included in the sitemap as well.
This config could be optional. We use mount points to include one part into every domain of an multisite setup.
I will create an pull request with the changes that work for us.
If you don't think that this is needed you can close this issue.
Hi markus,
thanks for the extension. It is really great and easy to use.
In my case i need a join between two tables for generated a sitemap for custom records. So is there any plans to support the typoscript select joins in the future?
Or a new AdditionalJoinService? ;-)
Even with plugin.tx_sitemapgenerator.urlEntries.pages = 0 I'm not able to exclude pages from the sitemap and only generate a sitemap for special records. Is this behavior intended to be like that?
Feature: To improve our performance (thousand of entries) we would like to create a scheduler task that generates the sitemap.xml and save this file at the given url in the command controller.
My start: I invest few minutes and build a simple task which use the common functions.
public function generateSitemapCommand($xmlPath)
{
$templateView = $this->objectManager->get(StandaloneView::class);
$templateView->getRequest()->setControllerExtensionName($this->extensionName);
$templateView->setFormat('xml');
$templateRootPath = GeneralUtility::getFileAbsFileName('EXT:sitemap_generator/Resources/Private/Templates/');
$partialRootPath = GeneralUtility::getFileAbsFileName('EXT:sitemap_generator/Resources/Private/Partials/');
$layoutRootPath = GeneralUtility::getFileAbsFileName('EXT:sitemap_generator/Resources/Private/Layouts/');
$templateView->setPartialRootPaths([$partialRootPath]);
$templateView->setTemplateRootPaths([$templateRootPath]);
$templateView->setLayoutRootPaths([$layoutRootPath]);
$templateView->setTemplate('Sitemap/List');
$variables = [
'sitemap' => $this->sitemapRepository->generateSitemap()
];
$templateView->assignMultiple($variables);
$fh = fopen($xmlPath . 'sitemap.xml', 'w+');
fwrite($fh, $templateView->render());
fclose($fh);
return true;
}
Problem 1: Settings aren't available.
$this->configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
$this->extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT,
'sitemap_generator'
);
$this->pluginConfig['1'] = $this->extbaseFrameworkConfiguration['plugin.']['tx_sitemapgenerator.'];
I overwrite it with this short snippet to get successfully the current settings.
Problem 2: Generating of the url fails because of the backend context
I have a few problems with this solution. The current typolink fails because of the non existing TSFE. My solution with the uriBuilder breaks, too.
This as short intro about my extensions tests.
And last but not least: Thanks for this good extension!
Best regards
Guido
Hi, i can't manage to get the news articles to be exported in the sitemaps. I only get the few pages i created for the website, but not the news articles that populate these pages. I added the following typoscript in the constants section of my main template (and also included the static template of the extension):
plugin.tx_sitemapgenerator {
urlEntries {
pages = 1
pages {
rootPageId = 1
allowedDoktypes = 1
additionalWhere = doktype!=6
}
}
}
plugin.tx_sitemapgenerator {
urlEntries {
news = 1
news {
active = 1
table = tx_news_domain_model_news
additionalWhere = pid=6
orderBy = title DESC
limit = 0,10
lastmod = tstamp
url = TEXT
url {
typolink.parameter = 9
typolink.additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}
typolink.additionalParams.insertData = 1
typolink.useCacheHash = 1
typolink.returnLast = url
typolink.forceAbsoluteUrl = 1
}
}
}
}
plugin.tx_sitemapgenerator.googleNewsUrlEntry = 1
Can you please tell me if this is correct?
These pages are mainly detail pages of a list. It does makes no sense to index them.
A special char in title of the news results in a XML error -> XML not well formed.
In my example a news title has a "&".
Hi.
TYPO3 9.x has been released. Will ext:sitemap_generator be migrated for this version ?
Thank you.
Hi!
Is it possible presetting the value of the changefreq? It might be very painful inserting that value by hand for every page in the typo3 backend.
Thanks in advance!
Hi,
I need the option that records are only listed if there is a translation available. IMHO it does not make sense that pages and records are listed in a sitemap, if there is not translation available.
Thanks :-)
When I enable this option "Exclude from sitemap" in the page, the sitemap still shows the page in the sitemap.xml file.
I checked caches and configs and everything seems to be ok.
Currently only pages with dokType=1 are listed in the sitemap. I know of installations where normal pages have custom dokTypes, which should also be listed in the sitemap.
Solution is to add the typoscript setting "allowdDokTypes" to pages section and match against the dokType of the page against this list.
Setting the default value to "1" will keep backwards compatibility.
Pull request will follow.
Hey there,
first off: great plugin, saved us a lot of work! It works fine with pages and tx_news so far.
We've got an Extbase-Extension with model but no database tables, since the data comes directly from an API. Controller and Actions are basically the same as in tx_news, but it misses the database mapping.
Does the sitemap extension need to use the database or is there another way to generate the sitemap url entries for our custom record type (via controller/action etc)?
Thanks for your help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.