Comments (10)
The slug is irrelevant on its own. The sitemap only cares about unique URLs and unique content.
Does each URL reference genuinely unique content, even if the slug part of the URL is the same for many URLs? Or do all 100 of those URLs with the same slug reference the same exact data?
The answer to that will determine whether you need to filter or not. Since you probably shouldn't have 100 identical pages with different URLs (bad for SEO), my guess is that you probably will want to list them all if they are unique. (Otherwise, why would you need 100 different URLs to get to the same page?)
from cakephp-sitemap.
The pages all have the same URL.
This is a different model called "searches"
The links for this are /search/keyword-term
Now when I show them normally I can either group them or just show unique, the sitemap is showing every instance rather than them being grouped.
from cakephp-sitemap.
In the model every single instance of the "search" has been saved as it is saved against users, dates and times. That way we can count how many there are, who has searched for it etc.
It also creates a page for that term going by the keyword so it is just a case of the sitemap only showing 1 for each keyword.
Almost like it needs to do a select and group by searchterm rather than getting EVERYTHING.
from cakephp-sitemap.
Okay, then it sounds like you need to make use of the conditions
key to try to restrict which records are returned. This plugin might not be able to fully meet your needs here-- if you do end up needing to add a "GROUP" clause I don't think we provide a good way to do that.
from cakephp-sitemap.
Would the conditions be able to limit it to one instance of it?
I have tried an XML generator but that way just likes to send a bot onto each page to gather links 👎
from cakephp-sitemap.
For our own reference: We'd probably want to change this to allow for an entire $options
array to be provided (with a default recursive = -1
added to it if that key is not already present) instead of just the conditions
key.
from cakephp-sitemap.
@nick-harper Probably not. At least, I can't think of an inventive way to do it only in the WHERE part of the query.
from cakephp-sitemap.
Damn :( I guess I will just need to use a generic generator.
Thanks very much for your help.
from cakephp-sitemap.
Feel free to issue a PR for the change I mentioned earlier. It's a logical improvement to make. Thanks for your feedback, in any case.
from cakephp-sitemap.
Just for reference created an issue associated with the suggested change of being able to pass the full options back to the generateSitemapData
method: #12
from cakephp-sitemap.
Related Issues (20)
- If there are no any attached model it send warning. HOT 2
- Update composer package name? HOT 1
- Update Packagist package name? HOT 1
- error Router HOT 1
- CakePHP installation issue HOT 3
- v3.0 XML Sitemap Listing View HOT 1
- v3.0 List Static Pages HOT 4
- SitemapAppController extends App\Controller\AppController HOT 1
- How to call the sitemap.xml HOT 2
- Test do not pass your own cs standard HOT 1
- Add handpicked results HOT 4
- Possibility to add multilanguage records
- Compress sitemap to gz
- What happens with limits? HOT 1
- Missing Docu HOT 3
- Problem with XML file when PHP short tag is enabled HOT 1
- Working with plugin tables HOT 1
- Auth and template questions HOT 1
- Package Using
- Modify routes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-sitemap.