Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Manish Yadav
Migrate of Website into liferay
February 7, 2013 12:22 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

i'm working on website migration. Live website contains around 150 to 200 articles. Live website have only one JSP divided into two columns. left side contains links and right side column contains content related to left side links all content stored into database. for eg:- W3School.com ..left side contains only parent and childern link and right contains content. if any body clicks on Javascript parent main link then respective child link comes on same jsp.
Could any body suggest how i can implement this functionality in liferay.I am able to migrate existing db to liferay structure article.
i know two approach.
1. Create pages separate separate hidden pages for parent and child links for eg:- there will be hidden page for JavaScript main link which will contains two
WCM display portlets .Page divided into two columns. Left side column portlet have child links and right side column WCM portlet have content of main link. if further any body clicks on child links then new hidden page for child link content will come.

2. in second approach i have to write custom portlet for getting content from cms. Only two pages will be there ..First is home page contains only links and second page same will contains two custom portlet one for links and second for content.

Could anybody please give me recommendation which approach will be better to maintain and migrate existing website into liferay.
i have few concern
1. which approach is good 1 or 2.
2. if approach 1 then can we create hidden pages dynamically
3. if approach second then anybody have any instruction or sample code for that

Thanks In advance
Attachment

Attachment

Attachments: w3cPng2.png (78.1k), w3cPng3.png (68.8k)
Oliver Bayer
RE: Migrate of Website into liferay
February 7, 2013 2:13 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 875

Join Date: February 18, 2009

Recent Posts

Hi Manish,

I would sugguest a slightly different approach:
  • create the page structure (not sure why you want to use hidden pages)
  • create a theme and modify the navigation.vm so that your menu sits on the left side
  • identify the mainly used layout of the existing articles
  • by using the above info you can create web content structures/ templates
  • now create all the articles in liferay by using the appropriate structure/ template and copy&paste the article content (maybe you can do this programmatically otherwise copy&paste the contents)

HTH Oli
Manish Yadav
RE: Migrate of Website into liferay
February 7, 2013 3:07 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

Oliver Bayer:
Hi Manish,

I would sugguest a slightly different approach:
  • create the page structure (not sure why you want to use hidden pages)
  • create a theme and modify the navigation.vm so that your menu sits on the left side
  • identify the mainly used layout of the existing articles
  • by using the above info you can create web content structures/ templates
  • now create all the articles in liferay by using the appropriate structure/ template and copy&paste the article content (maybe you can do this programmatically otherwise copy&paste the contents)

HTH Oli


Many Thanks Oliver for your quick reply

1. I want to use hidden pages because in structure i created repeated fields for name and link.
2. i can use navigation.vm but menu but my problem is links are the title of articles. do you have any idea how i can create dynamically menu and gave link of specify article.
is it possible to create 200 pages bcz i have 200 articles and i want to show every article on single page .? can we create only one page and get article dynamcially

Template Code
:-
#foreach($mainHeadingURL in $mainHeading.getChildren())
<b> <a href="$mainHeadingURL.getData()">$mainHeading.getData()</a></b></br>
#end
</div>

<div class="main1stcolLAST">
#foreach($items in $parentHeadingTitle.getSiblings())
#foreach($childLinkUrl in $items.getChildren())
<a href="$childLinkUrl.getData()">$items.getData()</a></br>

#end
#end

Structure
Attachment

Attachments: structure_forLINk.png (20.8k)
Oliver Bayer
RE: Migrate of Website into liferay
February 7, 2013 7:58 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 875

Join Date: February 18, 2009

Recent Posts

Hi Manish,

I would create a page for each chapter like e.g. JS Tutorial with many subpages. This way you have a friendly URL for each page. Otherwise you have to mess with URL parameters to get the correct article. In the end it all depends on your requirement so it's up to you which approach you choose.

I would choose creating pages/ subpages and place the articles there as this is the more intuitive/ easier way to go. If you think that 200 pages in total would be hard to navigate through you can also divide them into seperate sites e.g. a welcome site (/web/guest), a site for js tutorials (/web/js-tutorials), a site for html tutorials (/web/html-tutorials and so on. Even in this small example you can see the benefit of friendly urls. Implementing it this way you can also create different roles and set permission easily for each site (internally called group).

Greets Oli
Manish Yadav
RE: Migrate of Website into liferay
February 7, 2013 10:51 PM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

Many thanks Oliver Bayer for your reply

Can we create pages and sub pages dynamically with permissions using custom portelt. In Xml file i'll write full path of pages and subpages that xml i'll push into custom portlet.

Is there any other approach to create pages and subpages with permission dynamically or we have do it as a manual process.
Oliver Bayer
RE: Migrate of Website into liferay
February 8, 2013 3:05 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 875

Join Date: February 18, 2009

Recent Posts

Hi Manish,

no problem, I'm glad I could help a bit emoticon.

If you want to write a portlet to setup your page structure you can use "LayoutLocalServiceUtil" like e.g. one of the "addLayout(...)" methods to create pages programmatically. For subpages you have to set the parentLayoutId. If you want to divide the contents to different sites (see my hint for creating different sites/ groups) you have to change the groupId parameter otherwise if you create all pages under the same site you can use the same groupId.

Regards Oli
Manish Yadav
RE: Migrate of Website into liferay
February 8, 2013 4:54 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

Many thanks Oliver Bayer for your guidance,Now i got some idea

I need your favor , I'm going to start migration of live site into liferay portal.I have few doubts in migration process could you please share me your mail id so i can send you my doubts to your mail-id.

My mail-id:- manishyadav1103@gmail.com
Oliver Bayer
RE: Migrate of Website into liferay
February 11, 2013 1:53 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 875

Join Date: February 18, 2009

Recent Posts

Hi Manish,

please check your mails emoticon.

Oli