How do I generate a Sitemap.xml in Wicket? - sitemap

I'm struggling to generate a dynamic sitemap for SEO purposes in a Wicket 1.5 application. I looked at this example but couldn't understand what they mean exactly.
I see I need to create an xml page and mount it but then it talks about generating the url list. How do I do this part? Is there functionality in Wicket to get a list of mounted pages? According to that link, it's "very easy" to do this in Wicket 1.5 so I must be missing something obvious.
Any tips or pointers gratefully appreciated! Thanks.

i did exactly this in 2010. there was a wicketstuff-minis project for this.
it could be possible it still works if you dig it out of the archives.
http://mvnrepository.com/artifact/org.wicketstuff/sitemap-xml
the sources must also be somewhere out there..
this was built for wicket 1.4 but i guess they changed enough to make it no longer work.

Related

Programmatically get list of Portlets deployed in Liferay 7.2

I want to create a custom widgets tab where I want to display a list for available portlets. Is there any way to find out the list?
Thanks in advance.
I don't have an easy answer, but there should be enough information in source code for the MarketplaceAppManager portlet that is used in the Control Panel App Manager to list the apps (bundles).
I looked at the portlet code and I think a good starting place would be the JSPs for that portlet:
/modules/apps/marketplace/marketplace-app-manager-web/src/main/resources/META-INF/resources. Specifically view_modules.jsp seems to be what is responsible for rendering the list.
Looking at these would give you a good idea of what is involved with fetching and displaying them, and a hint at what the level of effort might be to emulate it.

How to remove date created in blog post url for pyrocms (codeigniter)

This may or may not have been answered. Since i've been searching for a correct answer the last few days, i'm afraid not. I'm working on this project in codeigniter (pyrocms) and i'm trying to get clean urls. I already managed to remove /index.php/ from the url. Except the blog module builds the urls from the date the post have been created (www.sitename.com/year/month/post-title. Obviously i want to achieve a url like www.sitename.com/post-title.
I tried routing in the module/blog/config/routes.php but that dind't work out for me as well.
Any help in the right direction would be much appreciated.
Thanks in advance!
Assuming you're using PyroCMS v2x
www.sitename.com/post-title is going to be controlled by your pages controller. It's a special thing the core dev team wrote in.
The blog is a module so www.sitename.com/module_name/... is how you call the module.
You can shorten the URL for the blog by editing the routing control in the blog module.
You could, at best, get away with www.sitename.com/blog/title, but you'll need to rewrite some of the module code and routing to do that. There's no easy way to do it like you might find in wordpress.

How to implement Ajax for my wordpress site?

I'm really confused.
I just desire to implement ajax in my wordpress site: clicking on each link of the menu or on each post, I'd like to show dinamycally the content in the main wrapper of the website (and at the same time I'd like to see the url changing everytime for each page or post).
I have made a research through Google and I found a multitude of tutorials or informations but each one of them is (for me) like incomplete.
Can you suggest me a good tutorial?
Or can you explain me what are the best solutions?
I read somewhere of "Ajaxify", a plugin, can it help me?
Be patient, I have always had some difficulties with ajax and in wordpress things seems to become even more complex.
I guess this tutorial can help you: http://www.designlunatic.com/2011/06/dynamically-load-wordpress-posts-with-jquery/

RESTful API with CMS Made Simple

I have a client with a content-heavy site built in CMS Made Simple. The redesign requires a mostly AJAX interface, and I think a frontend framework like Backbone or Angular would be the way to go.
I want to avoid moving off CMS Made Simple, though (client is used to that interface, it will be annoying to migrate all the data).
I think if I could find or create a RESTful api for CMS Made Simple, I'd solve my problem. But after searching around online, I only found CGSocialApp module, which seems to provide a limited API for things like user management. I've also looked into other AJAX solutions for CMS Made Simple, and there don't seem to be good modules for it.
If there is no ready-made solution for me, how complex would building a RESTful API module be? I haven't built a RESTFUL api in a PHP framework before.
Thanks for any guidance!
So, there is no easy answer for this question, as the CMSMS doesn't have a build-in RESTful API.
I would go for one of the two solutions:
1. Output the content as hand made json.
In CMSMS, you really have a lot of control on the templates. You could change the default templates to output json content instead of HTML content. The only issue is that the CMSMS will still send an http content-type header, that you can try to ignore in the JS part.
To access the menu, just remove it from the main template and create an empty page who output the {menu}with a custom template that also build json content.
That's the quick and dirty solution, but it should be very accessible in terms of doing it.
2. Create a dedicated module.
As far as I know, there are no modules that expose the CMSMS in RESTFul format, but a module is really very easy to build. Well, you can try to build it yourself, with the help of the community. It don't really solve the current problem, but it's a hint.
I hope it shed some light on the problem.

Symfony Sonata AJAX image multi-upload

I am trying to create a portfolio site and am stuck finding a good approach to deal with images. I have integrated the SonataAdmin Bundle and have setup Admin classes for "Projects" and "Images". My goal is to go into a Project and add images to it and select one of these images as the Project thumbnail.
Ideally I would like to integrate an AJAX multi-uploader. I am not sure the best approach for this and am looking for any suggestions / thoughts.
I have looked at the Sonata Media Bundle, though it seems more robust than I actually need and the learning curve to customize it seems a bit steep. I have already setup an image entity (symfony2 cookbook for uploading documents) I imagine I can create a many-to-one on images and projects rather than using the MediaBundle, though I am still at a loss of how to integrate an AJAX script for this.
Thanks in advance for any advice!
Shawn
I suggest you to look at https://github.com/punkave/symfony2-file-uploader-bundle
This bundle is based on the excellent blueimp jQuery-File-Upload package and provides multiple file uploads.
Edit 28/04/14: There is now also OneupUploaderBundle which supports a variety of uploaders and seems to be under more active development.
checkout https://github.com/ruian/RuianUploadifyBundle its support multiupload but only with flash plugin.
Also this bundle is worth a shot. Not really mentioning AJAX, but seems really strong in basic uploading features. Once you get that done, you can ajaxify by yourself. I'm planning to try this bundle in few days, I may update this answer later.
So I endedup using Valumns Ajax multi uploader: http://valums.com/ajax-upload/
I tried to customize the Sonata Admin Page but this proved a bit difficult, Instead I simply created a route / controller / view specifically for uploading batch images. It seems to be working great!

Resources