You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my situation, I am going to build a sitemap with following sub files:
sitemap.xml <- Sitemap Index File
sitemap/list-1.xml
sitemap/list-2.xml
...,
sitemap/list-n.xml
sitemap/map-1.xml
sitemap/map-2.xml
...
sitemap/map-n.xml
It has two groups: one starts with list- and one start with map-.
In this case, I set the Filename and then call *stm.Sitemap.Create() for each group.
However, the filename generator seems from *stm.Sitemap.Options.nmr, which is not reset when the filename is changed.
Situation
In my situation, I am going to build a sitemap with following sub files:
sitemap.xml
<- Sitemap Index Filesitemap/list-1.xml
sitemap/list-2.xml
sitemap/list-n.xml
sitemap/map-1.xml
sitemap/map-2.xml
sitemap/map-n.xml
It has two groups: one starts with
list-
and one start withmap-
.In this case, I set the Filename and then call
*stm.Sitemap.Create()
for each group.However, the filename generator seems from
*stm.Sitemap.Options.nmr
, which is not reset when the filename is changed.Hope to be fixed soon.
Code I am using
Expected to Get
In
sitemap/
:list-1.xml
list-2.xml
list-3.xml
map-1.xml
map-2.xml
Actual Got
In
sitemap/
:list-1.xml
list-2.xml
list-3.xml
list-4.xml
<- This seems created by namer in options, and the namer is not re-created when changing the filenamelist-5.xml
Proper solutions
opt.nmr = nil
at the end of*stm.Sitemap.SetFilename()
, so that when calling*stm.Sitemap.Create()
again, the namer will be recreated.*stm.Sitemap.SetNamer()
to enable namer customizing.The text was updated successfully, but these errors were encountered: