I am using sonata seo bundle and knp paginator bundle.
My Question is When I added new custom static url like :-(www.symfony.in/blog)
in our KNP Menu.It's added successfully. But When I run the :-
php app/console sonata:seo:sitemap --scheme=http web www.symfony.in --env=prod
Command execute successfully But in sitemap Blog url(www.symfony.in/blog) not added.
Any one know how to add custom url in Sonata SEO Bundle in Sitemap ?
I am google it but nothing found !
Thnaks!
You need to create a SitemapIterator in order to add your custom URLs to the Sitemap, as described in the documentation. This is an Iterator that you will have to declare as a service, and then reference into the sonata_seo.sitemap.services configuration.
Related
I am looking for solutions to integrate WordPress to Symfony 3.
My Symfony 3 project is running well with its own custom functionalities but the landing page looks lame compare to a WordPress landing page.
Now I want to update the visual of the landing page. Knowing that is something easy to do with a WordPress template, I am looking for this solution. (I might delegate the building of the WordPress site but need to be sure I can connect it with my existing Symfony 3 project.)
I found plenty of input on the subject, most of them are olds like: this one or that one.
There is also the EkinoWordpressBundle and symfony-wordpress-edition. But those seem to integrate Symfony within WordPress, and as I only require WordPress for display purposes I'd rather have it the other way around.
Any suggested direction to achieve that?
Follow these steps:
Place your wordpress installation into the /web folder e.g /blog
edit your symfony .htaccess file, then comment out this line.
DirectoryIndex app.php
Run your Wordpress as normal i.e wwww.domain.com/blog
I have an website built in wordpress and a member section built in zf2. Now i want to access logged in user details in wordpress but there is no direct way to do it.
We can achieve this by adding autoload file in index.php like :
include('./vendor/autoload.php'); // my autoload file is in vendor as i have installed zf2 throgh composer, update it accordingly
and you can access your session like :
use Zend\Session\Container;
$session = new Container('SESSION_CONTAINER_NAME');
it worked for me.
I need to override default profile show templaets. I copy directory from FOS bundle to my UserBundle, but i didnt see any results? What i am doing wrong?
That's now how template overriding works. You need to copy them into your app/Resources/ directory. This means to override templates from FOSUserBundle you'd copy them to app/Resources/FOSUserBundle/view/[template].html.twig and then customize as needed
My dashboard in Sonata Admin is completely weird.
I've removed the bundle from vendors and web.
Update with composer (all dev-versions of sonata) and clear the cache.
Still weird.
erro http://img21.imageshack.us/img21/246/qgy8.png
There has been an udpdate in the block_admin_list.html.twig in sonata admin bundle. See this commit
If you want to go back to the previous template, download this version of block_admin_list.html.twig and put this file in you app/Resources/view.
Now update your config.yml to change the list_block template :
sonata_admin:
# your config
# ...
templates:
list_block: ::block_admin_list.html.twig
I add the same bug yesterday and this workaround works fine.
Hope this helps
First of all, I would like to say that I'm very sorry for this shamefull question !
On my wordpress (v3.5) I just downloaded and install pods cms plugin (2.2).
I made my new awesome pod object (News for example), I added few custom attributes and saved it. The permalink I used is /news/{name}
I enabled Pods Template and Pods page, and created few News in the wp dasboard.
Back to my frontend I have nothing when I try to reach mywordpress.com/news/MySuperNew
And more scary I digged and digged the web in order to know how to tell to podsCms that for each Pods News object, I would like to use a custom template file of my own name "mySuperTemplateForNews.php"
edit1 : I noticed that in the Pods Pages setup you can create pages and specify the template file (created in the current theme folder) you want to use. But I still have no clue on how to bind a specific pod to a specific template...
I hope someone will be able to help me.
Thanks :)
Do you have permalinks enabled (anything but the default will work)?
You should make sure you add your pod page as "news/*"
Code goes into your pod page content area (or directly into your WP Page Template file) that contains the Pods loop and your other code. If you're using Pod Page content to store your PHP, you'll need to put pods_content() into your WP Page Template file wherever you need it to be output.