Hi,
On Wed, Mar 5, 2014 at 4:15 AM, - <irresistible...@gmail.com> wrote: > On Tuesday 04 March 2014 15:37:25 Martin Grigorov wrote: > > Normal Panel would do it too. > > Someone else recently asked for OpenGraph/Facebook meta headers recently > in > > this mailing lists. Check the archives. > > I found this 3D: Dynamic Headers for Open Graph tags in E-Com site > > I put this in my html header code: > > <?xml version="1.0" encoding="UTF-8"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket=" > http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" > xml:lang="it" lang="it"> > <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#"> > <meta name="robots" content="index,follow"> > <meta name="keywords" content="..."> > <meta name="description" content="..."> > > <wicket:container wicket:id="openGraph"></wicket:container> > > <title>... > > > And I add this in java code: > ... > add(new Facebook("openGraph",null,null)); > ... > > So, I create a new java file called Facebook.class: > > > package org.apache.wicket.examples....; > import ...; > > public class Facebook extends Panel implements Serializable > { private static final long serialVersionUID = 1L; > > public Facebook(String id, String query, String in) > { > super(id); > } > } > > > And finally I create a new file called Facebook.html: > > > <?xml version="1.0" encoding="UTF-8"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket=" > http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" > xml:lang="it" lang="it"> > > <wicket:panel> > <meta property="fb:app_id" content="117243945141208" /> > <meta property="og:site_name" content="Test" /> > <meta property="og:type" content="website" /> > <meta property="og:title" content="Test" /> > > <meta property="og:url" content="http://www.test.com/id=xXUjpHHfTLY" /> > > <meta property="og:description" content="Test description" /> > <meta property="og:image" content="http://www.test.com/xXUjpHHfTLY.jpg" /> > > </wicket:panel> > <body> > </body> > </html> > > > It runs ok, and if I check the source code of the rendered page it include > meta tags: > > <meta name="robots" content="index,follow"> > <meta name="keywords" > content="youtube,download,video,audio,mp3,aac,scarica,gratis"> > <meta name="description" content="Download streaming video from YouTube, > Dailymotion and much more Scarica video gratis da YouTube"> > > <wicket:container wicket:id="openGraph"><wicket:panel> > <meta property="fb:app_id" content="117243945141208" /> > <meta property="og:site_name" content="Test" /> > <meta property="og:type" content="website" /> > <meta property="og:title" content="Test" /> > > <meta property="og:url" content="http://www.test.com/id=xXUjpHHfTLY" /> > > <meta property="og:description" content="Test description" /> > <meta property="og:image" content="http://www.test.com/xXUjpHHfTLY.jpg" /> > > </wicket:panel></wicket:container> > > > BUT IT IS STILL STATIC, HOW I CAN MODIFY IT DINAMICALLY INTO THE JAVA CODE? > I am sorry but I am new in wicket and it results so difficult for me. In > PHP I can do it so quickly. > New in Wicket: http://markmail.org/message/efxl7bgzfd3sy2ga For 3 years experience with Wicket you should have heart of Label component and models. The Hello World example shows how to use Label - http://wicket.apache.org/guide/guide/helloWorld.html#helloWorld_3 Use a Label for each <meta> and use .setVisible(false) if any of them should be hidden when there is novalue for it. > Thank you so much for help. > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >