Closed (outdated)
Project:
Views Datasource
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2010 at 21:03 UTC
Updated:
12 Feb 2019 at 14:51 UTC
Jump to comment: Most recent
Comments
Comment #1
mikeytown2 commentedCreate a new view
Style: XML data document
Root element name: urlset
Top-level child element name: url
Using Views Custom Field create 2 PHP code fields.
loc
n:news
This site has a published date CCK field that tells at what time the node hits the front page view and is thus available to see. Also uses domain access source so no duplicate content
Node: Type = News
Node: Published Yes
Date: Date (node) Content: Publish Date (field_pub_date) between now -2 days and now
Domain Source: Domain Source ID = Current Domain
Comment #2
fas commentedThanks Mikey!
Just what I was looking for!
The example you put working perfectly.
What is not working is the part that replaces the "(urlset)" by "(urlset mln = "http://www.sitemaps.org/schemas/sitemap/0.9" xmlns: n = "http://www.google.com / schemas/sitemap-news/0.9 ">)"
The third PHP code you put this into a custom module.
But the part of, mymodule_preprocess_views_views_xml_style_raw, it seems not working.
Can you give me a hand?
Sorry for the bad English.
Greetings from Argentina!
Comment #3
mikeytown2 commentedTheme functions require a clear cache in order to work. Try clearing your caches and give it another go.
Comment #4
fas commentedThanks!!! Is working now!
Regards!
Comment #5
zeip commentedDrupal 6 has been EOL for some years, closing all D6 issues.