Jahia Dev Forum > Get the URL of the...

1 (1 Good)
0 (0 Bad)

Get the URL of the HTML rendering of an area

by  cedric.finance@finandric.com »  2016/01/26 15:41

Hi,

I'd like to get the HTML of the pagecontent area of the home page.

http://server/cms/render/default/en/sites/mySites/home/pagecontent.html gives an error.
http://server/cms/render/default/en/sites/mySites/home/pagecontent.json outputs some jcr properties.

How can I get the URL of the HTML rendering of the area of the page?

Thanks,
Cédric

  • Get the URL of the HTML rendering of an area
    2016/02/26 09:50

    cedric.finance@finandric.com <p style="line-height: 20.8px;">Hi,</p> <p style="line-height: 20.8px;"><span style="line-height: 1.6;">I&#39;d like to get the HTML of the pagecontent area of the home page.</span></p> <p style="line-height: 20.8px;"><span style="line-height: 20.8px;">http://server/cms/render/default/en/sites/mySites/home/pagecontent.html gives an error.</span><br /> <span style="line-height: 20.8px;">http://server/cms/render/default/en/sites/mySites/home/pagecontent</span><span style="line-height: 20.8px;">.json&nbsp;outputs some&nbsp;jcr properties.</span></p> <p style="line-height: 20.8px;">How can I get the URL of the HTML rendering of the area of the&nbsp;page?</p> <p style="line-height: 20.8px;">Thanks,<br /> C&eacute;dric</p>

  • Number of messages  1
    Registration date Jan 26, 2016
    0 (0 Good)
    1 (1 Bad)

    Re: Get the URL of the HTML rendering of an area

    by  rvt »  2016/01/27 19:46

    Cédric

    assuming you are within a JSP file trying to find out the URL you have a few options

    <c:url var="thisUrl" value="${url.base}${currentNode.path}.html" />
    ${thisUrl}<br /><br />
    <c:url var="thisUrl" value="${url.base}${jcr:findDisplayableNode(currentNode.parent, renderContext).path}.html" />
    ${thisUrl}<br /><br />
    <c:url var="thisUrl" value='${url.base}${jcr:getParentOfType(currentNode.parent,"jnt:page").path}.html'/>
    ${thisUrl}

    Kind Regards,
    R. van Twisk
    www.riesvantwisk.com

  • Re: Get the URL of the HTML rendering of an area
    2016/02/26 09:50

    rvt <p><span style="color: rgb(88, 88, 91); font-family: Lato, sans-serif; font-size: 16px;">C&eacute;dric</span></p> <p>assuming you are within a JSP file trying to find out the URL you have a few options</p> <pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Menlo';font-size:9.0pt;"> <span style="background-color:#232525;">&lt;</span><span style="color:#9876aa;background-color:#232525;font-weight:bold;">c</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">:url </span><span style="background-color:#232525;">var</span><span style="color:#6a8759;background-color:#232525;">=&quot;thisUrl&quot; </span><span style="background-color:#232525;">value</span><span style="color:#6a8759;background-color:#232525;">=&quot;</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">${</span><span style="background-color:#232525;">url.base</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}${</span><span style="background-color:#232525;">currentNode.path</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}</span><span style="color:#6a8759;background-color:#232525;">.html&quot; </span><span style="background-color:#232525;">/&gt;</span> <span style="color:#cc7832;background-color:#232525;font-weight:bold;">${</span><span style="background-color:#232525;">thisUrl</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}</span><span style="color:#e8bf6a;">&lt;br /&gt;&lt;br /&gt; </span><span style="background-color:#232525;">&lt;</span><span style="color:#9876aa;background-color:#232525;font-weight:bold;">c</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">:url </span><span style="background-color:#232525;">var</span><span style="color:#6a8759;background-color:#232525;">=&quot;thisUrl&quot; </span><span style="background-color:#232525;">value</span><span style="color:#6a8759;background-color:#232525;">=&quot;</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">${</span><span style="background-color:#232525;">url.base</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}${</span><span style="background-color:#232525;">jcr:findDisplayableNode(currentNode.parent</span><span style="color:#cc7832;background-color:#232525;">, </span><span style="background-color:#232525;">renderContext).path</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}</span><span style="color:#6a8759;background-color:#232525;">.html&quot; </span><span style="background-color:#232525;">/&gt;</span> <span style="color:#cc7832;background-color:#232525;font-weight:bold;">${</span><span style="background-color:#232525;">thisUrl</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}</span><span style="color:#e8bf6a;">&lt;br /&gt;&lt;br /&gt; </span><span style="background-color:#232525;">&lt;</span><span style="color:#9876aa;background-color:#232525;font-weight:bold;">c</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">:url </span><span style="background-color:#232525;">var</span><span style="color:#6a8759;background-color:#232525;">=&quot;thisUrl&quot; </span><span style="background-color:#232525;">value</span><span style="color:#6a8759;background-color:#232525;">=&#39;</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">${</span><span style="background-color:#232525;">url.base</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}${</span><span style="background-color:#232525;">jcr:getParentOfType(currentNode.parent</span><span style="color:#cc7832;background-color:#232525;">,</span><span style="color:#6a8759;background-color:#232525;">&quot;jnt:page&quot;</span><span style="background-color:#232525;">).path</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}</span><span style="color:#6a8759;background-color:#232525;">.html&#39;</span><span style="background-color:#232525;">/&gt;</span> <span style="color:#cc7832;background-color:#232525;font-weight:bold;">${</span><span style="background-color:#232525;">thisUrl</span><span style="color:#cc7832;background-color:#232525;font-weight:bold;">}</span></pre> <p>Kind Regards,<br /> R. van Twisk<br /> www.riesvantwisk.com</p>

  • Number of messages  185
    Registration date Jan 27, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Get the URL of the HTML rendering of an area

    by  sashok »  2016/02/26 09:50

    Only some nodes have an HTML rendering representation. The pagecontent node you are trying to view is a "container" type of node, that does not define any visual representation (thus no html). You can in theory define an html rendering for this node in your module, by adding jnt_contentList/html/contentList.jsp to your project, but I think this is a bad idea and will break everything.

    Can you explain more on what you actually want to achieve ?

    A workaround is to define another view, "htm" for example and access your node like that:

    http://localhost:8080/cms/render/default/fr/sites/bigTestSite/home/pagecontent.htm

    Regards,

    Alexander KIRILOV

  • Re: Get the URL of the HTML rendering of an area
    2016/02/26 09:50

    sashok <p>Only some nodes have an HTML rendering representation. The pagecontent node you are trying to view is a &quot;container&quot; type of node, that does not define any visual representation (thus no html). You can in theory define an html rendering for this node in your module, by adding jnt_contentList/html/contentList.jsp to your project, but I think this is a bad idea and will break everything.</p> <p>Can you explain more on what you actually want to achieve ?</p> <p>A workaround is to define another view, &quot;htm&quot; for example and access your node like that:</p> <p>http://localhost:8080/cms/render/default/fr/sites/bigTestSite/home/pagecontent.htm</p> <p>Regards,</p> <p>Alexander KIRILOV</p>

  • Number of messages  14
    Registration date Feb 26, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Get the URL of the HTML rendering of an area

    by  jordannroussel »  2016/02/26 10:22

    If you wish to get the "output HTML" of a node which supports the HTML rendering (such as jnt:contentList), you could get it by adding "html.ajax" after the path of the node.

     

    Example :

    If on my home page I have a direct contentlist named "myContentList", I could get its HTML by calling :

    http://localhost:8080/sites/siteKey/home/myContentList.html.ajax

  • Re: Re: Get the URL of the HTML rendering of an area
    2016/02/26 10:22

    jordannroussel <p>If you wish to get the &quot;output HTML&quot; of a node which supports the HTML rendering (such as jnt:contentList), you could get it by adding &quot;html.ajax&quot; after the path of the node.</p> <p>&nbsp;</p> <p>Example :</p> <p>If on my home page I have a direct contentlist named &quot;myContentList&quot;, I could get its HTML by calling :</p> <p>http://localhost:8080/sites/siteKey/home/myContentList.html.ajax</p>

  • Number of messages  13
    Registration date Feb 26, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Get the URL of the HTML rendering of an area

    by  sashok »  2016/02/26 14:05

    If you wish to get the "output HTML" of a node which supports the HTML rendering (such as jnt:contentList), you could get it by adding "html.ajax" after the path of the node.

     

    Example :

    If on my home page I have a direct contentlist named "myContentList", I could get its HTML by calling :

    http://localhost:8080/sites/siteKey/home/myContentList.html.ajax

    Hello,

    This just gives json again. I think the original request was to get the html "fragment"

    Regards,

    Alexnader

     

     

  • Re: Re: Re: Get the URL of the HTML rendering of an area
    2016/02/26 14:05

    sashok <blockquote> <p>If you wish to get the &quot;output HTML&quot; of a node which supports the HTML rendering (such as jnt:contentList), you could get it by adding &quot;html.ajax&quot; after the path of the node.</p> <p>&nbsp;</p> <p>Example :</p> <p>If on my home page I have a direct contentlist named &quot;myContentList&quot;, I could get its HTML by calling :</p> <p>http://localhost:8080/sites/siteKey/home/myContentList.html.ajax</p> </blockquote> <p>Hello,</p> <p>This just gives json again. I think the original request was to get the html &quot;fragment&quot;</p> <p>Regards,</p> <p>Alexnader</p> <p>&nbsp;</p> <p>&nbsp;</p>

  • Number of messages  14
    Registration date Feb 26, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Get the URL of the HTML rendering of an area

    by  jordannroussel »  2016/02/26 16:20

    It won't return JSON.

    A call to "html.ajax" on a node which have a render for HTML will return the HTML ouput of the fragment itself, without the context of the template.

    It's one possible way to display content from a node from an asynchronous call.

     

    If you have installed a SDK or if you have ACMESpace-demo-site on your DigitalFactory, you could give a try on this URL : http://localhost:8080/sites/ACMESPACE/home/news/corporate-news/main.html.ajax

     

    ContentList nodetype has by default a way to render an HTML view. It uses jmix_list/html/ views by inheritance.

  • Re: Re: Re: Re: Get the URL of the HTML rendering of an area
    2016/02/26 16:20

    jordannroussel <p>It won&#39;t return JSON.</p> <p>A call to &quot;html.ajax&quot; on a node which have a render for HTML will return the HTML ouput of the fragment itself, without the context of the template.</p> <p>It&#39;s one possible way to display content from a node from an asynchronous call.</p> <p>&nbsp;</p> <p>If you have installed a SDK or if you have ACMESpace-demo-site on your DigitalFactory, you could give a try on this URL :&nbsp;http://localhost:8080/sites/ACMESPACE/home/news/corporate-news/main.html.ajax</p> <p>&nbsp;</p> <p>ContentList nodetype has&nbsp;by default a way to render an HTML view. It uses jmix_list/html/ views by inheritance.</p>

  • Number of messages  13
    Registration date Feb 26, 2016
    0 (0 Good)
    0 (0 Bad)

    FAT LOSS Related Articles

    by  GymGuyPr »  2017/07/25 00:40

    Colon Hydrotherapists estimate that the average person is carrying between 5 to 20 pounds of excess weight within the colon. A very good detox treatment center could make the detoxification process simple and alleviate the soreness of withdrawal symptoms inside patients. When it comes to detox products, there are usually pills, herbs, shakes in addition to teas galore. Inpatient treatment detox center: However, when the addiction is regarding a serious nature in addition to there is more than one addiction, an inpatient treatment center is the best solution for an addict. Don't move very frustrating to be able raspberry ketone 600mg to your self, make this particular happen simple and simple totally free eating plan so that you can shed weight along with cleansing your whole body without having to spend anything at all. Gradually our physique immune system begin to crack down and leave the body vulnerable to diseases, methods disorder or even induce the enhancements made on behavioral or even emotional that may where to buy fat burner lead to depression When you always feel overly tired, digestion disorder, gaining weight, aches and pains that could be the symptoms of triggering you in order to start up a detox program. Anytime you hear of the particular detox diet plan, a person more than likely start thinking about cleaning your current body of toxic ingredients. These machines leave a lot of radiation inside our bodies, which of course increases the risk associated with cancer. I possess a very simple solution for you, ladies: very simple detox, and this means eating detox very foods. The most pure raspberry ketone frequent and natural way to start up a body detoxing is to stop our own bad habits and kick start a detox diet, however it is important to seek advice from your physician before you kick start a body detox plan, as it need to usually be carried out under the advice plus monitor of a doctor. A 21-day detoxification with colonics will give you fantastic results that will would compare to weeks of dieting. It depends on our current diet, our physical state and energy degree, put simply, how intense we need to detox depends does garlic clean your system on our individual way of life and needs. In addition to that, the particular tap water we consume each day can also be dealt with with chemicals such as purification and cleansing agent.
    GymGuyPr
    Number of messages  3
    Not registered
    0 (0 Good)
    0 (0 Bad)

    Creditos Rapidos Y Prestamos Online Hasta 5000€

    by  Otissic »  2017/08/04 09:38

    Entre las principales características de estos creditos rapidos y faciles online podemos destacar la simplicidad y la rapidez. El compromiso es que conseguir un empréstito personal a través de un bando ancestral fundación de creditos rapidos hasta 1000 euros rapidos puede percibir más espacio. Si los amigos y la cepa no son una elección, sera factible que tenga que demandar a la elaboración de los prestamos rapidos online, prestamos online rapidos. Los créditos rápidos te permiten obtener una pequeña cantidad de dinero rápido, incluso en unos pocos minutos solicitándolos online a través de Internet. La rapidez es sin duda la primary ventaja de los minicréditos créditos rápidos online, si la cantidad Su explicacion que solicitas no supera los 600 euros puedes llegar a tener el dinero en 15 minutos, es un proceso muy rápido y muy cómodo ya que puedes realizar todo el proceso de solicitud de manera online desde tu propio domicilio y a cualquier hora, con las ventajas que esto conlleva. No tienes que justificar para qué quieres el dinero, al tratarse de pequeñas cantidades el precio total a pagar no es demasiado alto, es muy útil para empresas autónomos, en algunos prestamos express sin buro casos no necesitas presentar una nómina un aval, la tramitación del préstamo es muy rápida, puedes solicitar el préstamo por Internet de manera online sin necesidad de desplazarte. Entre las principales características de estos creditos rapidos y faciles online podemos destacar la simplicidad y la rapidez. El compromiso es que conseguir un empréstito personal a través de un bando ancestral fundación de creditos rapidos hasta 1000 euros rapidos puede percibir más espacio. Si los amigos y la cepa no son Obtener mas informacion una elección, es factible que tenga que demandar a la elaboración de los prestamos rapidos online, prestamos online rapidos. Solicitar créditos rápidos online sin nómina es posible, pero tienes que tener en cuenta que la entidad crediticia te va a pedir que acredites de alguna manera que vas a poder devolver el préstamo rápido, normalmente si http://1i1.io/1b no tienes nómina puedes presentar otra fuente fiable de ingresos como la prestación por desempleo, la pensión, cualquier otra que poseas, en caso de no tener una fuente de ingresos probablemente te soliciten un aval.
    Otissic
    Number of messages  1
    Not registered
    0 (0 Good)
    0 (0 Bad)

    Micropréstamos Online Sin Papeles ~ PrestamosEnElDia.com.mx

    by  Bennysic »  2017/08/04 10:12

    El impacto de Internet en la vida de cada hombre moderno no puede ser sobrestimado. Sin filas largas, sin esperas, sin presentar papeles, sin preguntas innecesarias e incómodas…. Te ofrecemos facilidad y comodidad, sin trámites y sin http://52o.co/xijnP papeleos para que puedas conseguir el dinero que precisas. Muchas empresas de préstamos rápidos tienen a tu disposición créditos especiales, que te permiten disponer de dinero al instante sin tener una fuente oficial de ingresos. Para los prestamos rapidos debes de solicitar sólo cantidades de dinero que puedas pagar de forma segura en el tiempo establecido. Lo único que necesitamos para analizar tu caso child los datos personales básicos, el número de documento y el de cuenta bancaria donde te haremos el depósito y asi obtendras tu prestamo en 10 minutos sin papeleos! Al pedir prestamos rapidos de esta forma, podras disfrutar de dinero urgente sin tener que esperar demasiado. Mira a tu alrededor, y te darás cuenta que la demanda de los préstamos rápidos online ha aumentado considerablemente durante los últimos años. La mayor ventaja del crédito rápido online sera que el proceso de concesión de los mismos es 100% online. De esta forma podrás entender mejor cómo funciona el mecanismo de expedición de préstamos rápidos online. El mayor motivo por el que los préstamos bitcoin para pequeñas empresas en Chile boy http://52o.co/COaJt imbatibles ha sido que no existe mediación de bancos tradicionales. Sin filas largas, sin esperas, sin presentar papeles, sin preguntas innecesarias e incómodas…. Te ofrecemos facilidad y comodidad, sin trámites y sin papeleos para que puedas conseguir el dinero que precisas. Muchas empresas de préstamos rápidos tienen a tu disposición créditos especiales, que te permiten disponer de dinero al instante sin tener una fuente oficial de ingresos. Usar la opción de comparar préstamos online es una forma muy lógica para cubrirse las espaldas a la hora de pedir dinero fácil online, con el fin de no pagar abismales intereses. Sin embargo, cada día la gente en todo el mundo se vuelve más y más común el creciente número usuarios de los créditos rápidos al instante, y nuestro país no sera prestamos rapidos sin papeles una excepción.
    Bennysic
    Number of messages  1
    Not registered
    0 (0 Good)
    0 (0 Bad)

    Las 25 Mejores Ideas Sobre Emprestimo Consignado Inss En Pinterest

    by  Amigosic »  2017/08/04 10:54

    Conhece as linhas e modalidades de crédito para pessoa física oferecidas pelo Banco, Bradesco possui diversas linhas de crédito disponibilizas para liberação de dinheiro rápido e sem complicação, Se estiver precisando de  http://52o.co/9ngeZ empréstimo pessoal”, é muito simples fazer uma simulação e escolher a melhor opção que você necessita. Meio mais seguro de conseguir um empréstimo online através da internet é procurar bancos conhecidos e confiáveis. Rai, prestamos para construccion de vivienda colombia es posible obtener entidades financieras de prestamos más online de liquidez y etc, por autónomos. Por ejemplo, si tenemos deudas impagadas registradas en alguna lista de morosidad, single podremos pedir créditos online con ASNEF a prestamistas privados, pues ningún banco querrá prestarnos dinero. Se está volviendo cada vez más popular gestionar las finanzas personales totalmente online; ahora podrás añadir rápidas solicitudes de préstamos a la banca online los pagos con tarjeta por internet. Cuenta bancaria es requisito indispensable ser titular de una cuenta prestamos online pensionistas bancaria para transferir prestamos online pensionistas el préstamo y para prestamos rapidos sin papeleos y fiables pagar las cuotas. Crédito está sujeito à análise e disponível para aposentados ou pensionistas do inss. Para obter crédito pessoal consignado Bradesco não é necessário apresentação de avalista ou garantia. Líderes do movimento de aposentados do INSS apresentaram proposta ontem ao Grupo de Trabalho do Conselho Nacional da Previdência Community (CNPS) que reduz a margem consignável - de 30% para 20% - nos empréstimos bancários com desconto em folha. Empréstimo consignado com desconto em folha para servidor público federal Echa un vistazo a la entrada aquí siape e prestamos online pensionistas aposentado e pensionista do inss. Se você pretende quitar uma dívida com cartão de crédito, que cobra juros altos, empréstimo online com um banco ou empréstimo consignado são as melhores opçõha sido, para diminuir suas prestaçõsera e pagar sua dívida.
    Amigosic
    Number of messages  2
    Not registered
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page