Fórum
WCM link to a page in LR 6
Rahul Bhattacharya, modificado 11 Anos atrás.
WCM link to a page in LR 6
Junior Member Postagens: 58 Data de Entrada: 16/01/10 Postagens Recentes
Hi,
the WCM in LR 6 has a structure field for link to page.
When i set one i see in db its saved as 4@private-group. How am i supposed to show this on template.
There is absolutely no documentation guiding users on this.
thanks
Rahul
the WCM in LR 6 has a structure field for link to page.
When i set one i see in db its saved as 4@private-group. How am i supposed to show this on template.
There is absolutely no documentation guiding users on this.
thanks
Rahul
Tejas Kanani, modificado 11 Anos atrás.
RE: WCM link to a page in LR 6
Liferay Master Postagens: 654 Data de Entrada: 06/01/09 Postagens Recentes
Hi Rahul,
Lets say if you structure has below field which bring Link to Page feature.
You can get its url using below code in your template,
Hope this helps
Lets say if you structure has below field which bring Link to Page feature.
<dynamic-element name="LinkToPage" type="link_to_layout" index-type="" repeatable="false" />
You can get its url using below code in your template,
$LinkToPage.getData()
Hope this helps
Rahul Bhattacharya, modificado 11 Anos atrás.
RE: WCM link to a page in LR 6
Junior Member Postagens: 58 Data de Entrada: 16/01/10 Postagens Recentes
Hi,
i dont think its working that way in 6.1.0.
this is the part in my structure
<dynamic-element instance-id="PN2odmhB" name="article-display-page" type="link_to_layout" index-type="">
<dynamic-content><![CDATA[4@private-group]]></dynamic-content>
</dynamic-element>
when i am doing $article-display-page.getData() i am just getting "4".
thanks
Rahul
i dont think its working that way in 6.1.0.
this is the part in my structure
<dynamic-element instance-id="PN2odmhB" name="article-display-page" type="link_to_layout" index-type="">
<dynamic-content><![CDATA[4@private-group]]></dynamic-content>
</dynamic-element>
when i am doing $article-display-page.getData() i am just getting "4".
thanks
Rahul
Tejas Kanani:
Hi Rahul,
Lets say if you structure has below field which bring Link to Page feature.<dynamic-element name="LinkToPage" type="link_to_layout" index-type="" repeatable="false" />
You can get its url using below code in your template,$LinkToPage.getData()
Hope this helps
Tejas Kanani, modificado 11 Anos atrás.
RE: WCM link to a page in LR 6
Liferay Master Postagens: 654 Data de Entrada: 06/01/09 Postagens Recentes
Hi Rahul,
If you want the url of selected page try below code.
If your structure is,
Then your template to get page url would be
If you want to generate link for the same.
Hope this would help.
Regards,
Tejas
If you want the url of selected page try below code.
If your structure is,
<dynamic-element instance-id="PN2odmhB" name="article-display-page" type="link_to_layout" index-type="" />
Then your template to get page url would be
$article-display-page.getUrl()
If you want to generate link for the same.
<a href="$article-display-page.getUrl()">Link</a>
Hope this would help.
Regards,
Tejas