Message Boards
Where is page name stored in MySQL
Ishan Sahore, modified 11 Years ago.
Where is page name stored in MySQL
Junior Member Posts: 56 Join Date: 4/26/12 Recent Posts
Hi all,
Can someone tell me in which table is the Page Name stored in MySQL database?
Thanks
Can someone tell me in which table is the Page Name stored in MySQL database?
Thanks
David H Nebinger, modified 11 Years ago.
RE: Where is page name stored in MySQL
Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
I believe it's in layouts, but don't go mucking with the database.
The Liferay API is the only approved way for retrieving values.
The Liferay API is the only approved way for retrieving values.
Priyanka Dhingra, modified 11 Years ago.
RE: Where is page name stored in MySQL
Liferay Master Posts: 501 Join Date: 12/20/11 Recent Posts
Yes david is right..its in layout table
listed in name as
listed in name as
<!--?xml version='1.0' encoding='UTF-8'?-->
<root available-locales="en_US" default-locale="en_US">
<name language-id="en_US">MyPage</name>
</root>
Hitoshi Ozawa, modified 11 Years ago.
RE: Where is page name stored in MySQL
Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
Following up on David, page name can be retrieved by the following
Layout layout = LayoutLocalServiceUtil.getLayout(long plid);
String pageName = layout.getName();
Layout layout = LayoutLocalServiceUtil.getLayout(long plid);
String pageName = layout.getName();
Abey M, modified 11 Years ago.
RE: Where is page name stored in MySQL
New Member Posts: 18 Join Date: 1/20/12 Recent Posts
the query for mysql would be
select t3.name, t2.name, t1.* from layout as t1
left join layout as t2 on t2.layoutid = t1.parentLayoutId
left join layout as t3 on t3.layoutid = t2.parentLayoutId
where t1.name like '%My Page Name%'
select t3.name, t2.name, t1.* from layout as t1
left join layout as t2 on t2.layoutid = t1.parentLayoutId
left join layout as t3 on t3.layoutid = t2.parentLayoutId
where t1.name like '%My Page Name%'
Hitoshi Ozawa, modified 11 Years ago.
RE: Where is page name stored in MySQL
Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
Shouldn't query database table directly from the program because liferay caches in memory so the values in the database table may not be up to date until liferay is shutdown.