Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2019-07-16 08:26:10

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318728:

Hi Gallex, Is there a reason you are not using the native way?

not dynamic, more handwork – looks to me at first glance… but i will give a try in smaller sites.

Offline

#170 2019-07-16 10:23:38

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318212:

This is no longer needed. You can create a new section called mysitemap and include the following template which can be linked:

<?xml version="1.0" encoding="UTF-8"?>...

You will be able to reach the sitemap on yoursite.tld/mysitemap/. Do amend to your needs and hopefully the community will correct any errors I have made.

did like you suggested, here is my result – must it look like that?

my page:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc><txp:site_url /></loc></url>
<txp:section_list exclude="sitemap,muu,various,test,otsing">
<url><loc><txp:site_url /><txp:section />/</loc></url>
</txp:section_list>
<txp:article_custom section="veebidisain,portfolio,kontaktid,hobuvankrid" break="url" wraptag="" limit="9999">
<loc><txp:permlink /></loc>
<lastmod><txp:modified format="%Y-%m-%dT%H:%M:%SZ" /></lastmod>
</txp:article_custom>
</urlset>

Last edited by Gallex (2019-07-16 11:38:14)

Offline

#171 2019-07-16 12:07:03

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: rah_sitemap

Looks just fine… If you look at the source.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#172 2019-07-16 12:17:46

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318751:

Looks just fine… If you look at the source.

aa, source! ;) yeah, now looks fine

google search console doesn’t like breaks here:

<url><loc>https://www.hm-kodulehed.ee/hobuvankrid/</loc></url>
<br />
<url><loc>https://www.hm-kodulehed.ee/kontaktid/</loc></url>
<br />
<url><loc>https://www.hm-kodulehed.ee/portfolio/</loc></url>
<br />
<url><loc>https://www.hm-kodulehed.ee/veebidisain/</loc></url>

to remove <br /> added break="" here: <txp:section_list exclude="sitemap,muu,various,test,otsing" break="">

Last edited by Gallex (2019-07-16 12:30:15)

Offline

#173 2019-07-16 12:36:11

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: rah_sitemap

Thinking about it, there seems to be something wrong! Look at mine. ~Do you have it as a section page?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#174 2019-07-16 12:45:45

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318755:

Thinking about it, there seems to be something wrong! Look at mine. ~Do you have it as a section page?

yes. created new section “sitemap” and set uses page “sitemap”. or do i need create new theme for that? right now it uses “default”

Offline

#175 2019-07-16 13:36:24

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: rah_sitemap

Hi Gallex
You need to create a new page, not theme.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#176 2019-07-16 13:47:09

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318757:

Hi Gallex
You need to create a new page, not theme.

i did. and set section ‘sitemap’ to use that page

Last edited by Gallex (2019-07-16 13:49:46)

Offline

#177 2019-07-16 13:54:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: rah_sitemap

This is exactly how we are using it now. Could you amend to your liking and post the results here?

Also… As txp nomenclatures are slightly confusing, by new page you mean in Presentation>Pages right? I’m saying this as your articles seem to be following the site.url/article mode and your sections follow the site.url/section/ one.

>Edited to add. If you created an article with the code, you may have to delete it for the sitemap to work.

Last edited by colak (2019-07-16 14:00:59)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#178 2019-07-17 10:05:44

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318759:

This is exactly how we are using it now. Could you amend to your liking and post the results here?

Also… As txp nomenclatures are slightly confusing, by new page you mean in Presentation>Pages right? I’m saying this as your articles seem to be following the site.url/article mode and your sections follow the site.url/section/ one.

>Edited to add. If you created an article with the code, you may have to delete it for the sitemap to work.

i am not sure i understood you.. but, i did 2 things:

that’s all. did not create any articles.

my article URL pattern /section/title/

Offline

#179 2019-07-17 10:33:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: rah_sitemap

On top of the page add

<txp:header value="application/xml; charset=utf-8" />

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#180 2019-07-17 11:09:42

Gallex
Member
Registered: 2006-10-08
Posts: 1,308

Re: rah_sitemap

colak wrote #318777:

On top of the page add

<txp:header value="application/xml; charset=utf-8" />...

yep, now is perfect, thank you!
this row was absent in your example here – i took it from there

Offline

Board footer

Powered by FluxBB