Google sitemap with tx_news - typo3-8.x

I try to build a google sitemap with typo3 8.7.15, tx_news 6.3.0 and dd_googlesitemap 2.1.4
I chose /?eID=dd_googlesitemap&id=1&sitemap=txnews&singlePid=19&pidList=13&L=0 with singlePid (my site for the detail-page) and pidList with the url of the folder in which the news are stored. L=0 - I have no extra language so I tried without.
In both variants the google map is empty - anyone any idea? Here the complete URL: http://www.sbo-guetersloh.de/?eID=dd_googlesitemap&id=1&sitemap=txnews&singlePid=19&pidList=13&L=0

Insert page root in id
http://www.sbo-guetersloh.de/?eID=dd_googlesitemap&id=1&sitemap=txnews&singlePid=19&pidList=13&L=0
Ex:
id=1212 - Site root page id
sitemap=txnews - type txnews (for plugin tx_news)
singlePid=19 - id for detail page
pidList=13 - data stored id

Related

how to handle nested level dynamic routing in Nextjs

I have to implement 3 dynamic page routes in nextjs App.
/blog/category/postname
/blog/category
/blog/postname
I can implement 1 & 2 routes as dynamic routes but the problem is with the 3rd one. Actually, I need 3rd one because the production site is having the same slug for some of the posts. so want to maintain the same slugs in my nextjs application as well. Is there any solution to implement this??
You have an example here.
In your /pages:
You create blog folder.
Case 1 (excluding root): In blog, you create [...slug].js (or .tsx)
Example: /blog - ERROR ;/blog/category - OK; /category/postname - OK
Case 2 (lot of levels, including root): In blog, you create [[...slug]].js (or .tsx)
Example: /blog - OK;/blog/category - OK; /category/postname - OK
You handle all logic inside this file.
You can check my answer to understand how routing is done.

Creating static paths with multiple constrained params

I'm now in the process of developing my small project and I'm not sure if it's even possible to do this the way I will describe below, so... I have dynamic routes like "/[community]/[townName]". How can I generate static paths where [townName] is constrained to [community]?
In other words - let's say we have townName "abc1". This town is in community "xyz1" so the page /xyz1/abc1 should be accessible and NOT throw 404. But there is also town with the same name "abc1" in "xyz2". So the path /xyz2/abc1/ should also be accesible.
However there is no town with same name in community xyz3 so I do not want to generate page for /xyz3/abc1/ - user should see 404 error.
Of course each town has it's unique ID in database and I could use it to generate pages, but I want my url to be SEO friendly.
All help and tips are appreciated. Thanks!
You should check getStaticPaths and dynamic routes from official Next.js website. It has more than one way to do what you want but there are additional customization options.

CategoryManyToManyField tuns to emty QuerySet in non edit mode

I write a new plugin for aldryn_newsblog application. I want to list articles by categories. The plugin takes the list of categories using CategoryManyToManyField.
The plugin displays the articles having requested categories only in edit mode. As soon as I publish page with newly added plugin it displays none of the articles. I checked that self.categories.all() becomes empty.
Why it is happening?
This is for;
aldryn-newsblog2.1.1
Django==1.11.17
django-cms==3.5.3
It acts the same on local django development server and on remote apache
class NewsBlogCategoryPlugin(PluginEditModeMixin, AdjustableCacheModelMixin, NewsBlogCMSPlugin):
....
categories = CategoryManyToManyField('aldryn_categories.Category', verbose_name=_('categories'), blank=True)
....
def get_articles(self, request):
print (self.categories.all())
queryset = Article.objects
main_qs = queryset.all().filter(categories =
self.categories.all())
return main_qs
I believe that the issue is this:
when your page is published, the plugin instance is copied
in the published version of the page, there is now a new plugin instance
this new plugin instance does not have the relations to the Categories that the original did
You need to ensure that when a plugin is copied, so are its relations.
See handling relations in the django CMS documentation.
Thank you #Daniele. I just have added following the handling-relations
def copy_relations(self, oldinstance):
self.categories = oldinstance.categories.all()
And now it works

WP Job Manager - Job Types - Custom Permalink

This question is WP Job Manager for Wordpress specific.
I activated the plugins native "Job Types" taxonomy and created 2 job types, "Schools" and "Hotels".
I would like to customise the permalink, so it reads the actual name of the job-type.
Bt default the Listing Base URL for all WP Job Manager listings is : /listings/
What I would like to achieve is that from the default:
example.com/listings/my-job-listing-1
and
example.com/listings/my-job-listing-2
it would read:
example.com/schools/my-job-listing-1
and
example.com/hotels/my-job-listing-2
Would something like this be possible?
Try this: https://mikejolley.com/2013/12/04/use-wordpress-url-manipulation-functions/
Remove the current link arguments with remove_query_arg(); and add the new ones. With add_query_arg();

How to change url_alias partially according to a pattern Drupal

How to change url_alias partially according to a pattern?
We have site with reports to users.
We continue to update the reports with new content node but the url_alias kept same.
For example,
/report/report_a
/report/report_a/subreport_1
/report/report_b
…...
Users bookmark the pages. So they can get into the reports directly.
Recently we change the path pattern with /docs/ in front:
/docs/report/report_a
/docs/report/report_a/subreport_1
/docs/report/report_b
…...
Now the new content nodes go to these url_alias.
But the users have booked mark the pages.
So we want to make them previous book marks, url_alias, can be redirected into the new path.
For example,
/report/report_a to be redirected into /docs/report/report_a
/report/report_a/subreport_1 to be redirected into
/docs/report/report_a/subreport_1
That means to make /report/* paths to be redirectly to /docs/report/* paths
Here * is wildcard.
Do the old report pages still exist? You could add a bit of javascript to each page that redirects to the new location...
Can you create aliases for the old nodes? If there are a lot, it probably wouldn't be too hard to run a script that takes all the old paths and creates aliases for them.
In D7, URL Aliases are under Config | Search and metadata
It's probably easiest add a redirect to your .htaccess file. Something like this should work for your example:
Redirect /report/ /docs/report/

Resources