News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adam Culp:
Zend Framework 2 XML Sitemap
September 09, 2013 @ 11:15:09

In a new post to his site Adam Culp shares how he created an XML sitemap for his Zend Framework 2-based application as he made it (the SunshinePHP site) more SEO friendly.

I was pleasantly surprised to see the Navigation component of Zend Framework 2 includes a bunch of view helpers, including a Sitemap helper. So now I have an xml sitemap created by Zend Framework 2 that works hand in hand with the site navigation. However, the documentation was not complete as of this writing and caused me to do a bit of trial and error debugging to get it working. Below I will post how I got it working, in hopes it will help others.

The code to get it working is relatively simple - set it up in the module configuration, specify the navigation structure and add a route for the sitemap output. The view then accesses the navigation handling and calls a "sitemap" method to push the XML result out to the user.

0 comments voice your opinion now!
xml sitemap sunshinephp zendframework2 navigation helper

Link: http://www.geekyboy.com/archives/770

blog comments powered by Disqus

Similar Posts

Codewalkers.com: Booke Review - Pro PHP XML and Web Services

VT\'s Tech Blog: A Few XML & PHP Tutorials

Vidyut Luther\'s Blog: Book Review - \"No Nonsense XML Web Development With PHP\"

John Cox\'s Blog: Book Review - XML Web Development

Zend Developer Zone: Book Review - PHP Programming with PEAR


Community Events

Don't see your event here?
Let us know!


series language introduction extension release conference video podcast api laravel library development voicesoftheelephpant interview framework unittest laravel5 opinion community psr7

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework