Jahia Dev Forum > Override default...

8 (8 Good)
0 (0 Bad)

Override default view in Jahia 7

by  Adrien »  2014/10/14 07:48

Hi,

I'm trying to override a default view from a default module, but it doesn't work. For exemple if I create a jnt_bigText/html/bigText.jsp it does nothing, but a jnt_bigText/html/bigText.customview.jsp add my "customview" as a view.

Same problem with a default class ...

Is it a OSGi issue ? Maybe I'm doing something wrong.

Thanks,

Adrien

Adrien
Number of messages  1
Not registered
0 (0 Good)
0 (0 Bad)

Re: Override default view in Jahia 7

by  thbaymet »  2016/01/22 16:16

Hi,

I was looking for the solution of this problem. Here is the solution how you can override default view of a jahia module component. In your module, edit pom.xml file and set module as dependency and define a module priority. 

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
                <instructions>
                    <Jahia-Depends>default, formbuilder, socialsharing</Jahia-Depends>
                    <Jahia-Module-Priority>10</Jahia-Module-Priority>
                </instructions>
            </configuration>
        </plugin>
    </plugins>
</build>

Now, you can override default views of the formbuilder or socialsharing module's components. You can also try to add jnt_socialsharing/html/socialsharing.default.jsp or even jnt_socialsharing/html/socialsharing.jsp. 

 

  • Re: Override default view in Jahia 7
    2016/01/22 16:16

    thbaymet <p>Hi,</p> <p>I was looking for the solution of this problem. Here is the solution how you can override default view of a jahia module component. In your module, edit pom.xml file and set module as dependency and define a module priority.&nbsp;</p> <pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'Courier 10 Pitch';font-size:10,5pt;"> <span style="color:#e8bf6a;">&lt;build&gt; </span><span style="color:#e8bf6a;"> &lt;plugins&gt; </span><span style="color:#e8bf6a;"> &lt;plugin&gt; </span><span style="color:#e8bf6a;"> &lt;groupId&gt;</span>org.apache.felix<span style="color:#e8bf6a;">&lt;/groupId&gt; </span><span style="color:#e8bf6a;"> &lt;artifactId&gt;</span>maven-bundle-plugin<span style="color:#e8bf6a;">&lt;/artifactId&gt; </span><span style="color:#e8bf6a;"> &lt;extensions&gt;</span>true<span style="color:#e8bf6a;">&lt;/extensions&gt; </span><span style="color:#e8bf6a;"> &lt;configuration&gt; </span><span style="color:#e8bf6a;"> &lt;instructions&gt; </span><span style="color:#e8bf6a;"> &lt;Jahia-Depends&gt;</span>default, formbuilder, socialsharing<span style="color:#e8bf6a;">&lt;/Jahia-Depends&gt; </span><span style="color:#e8bf6a;"> &lt;Jahia-Module-Priority&gt;</span>10<span style="color:#e8bf6a;">&lt;/Jahia-Module-Priority&gt; </span><span style="color:#e8bf6a;"> &lt;/instructions&gt; </span><span style="color:#e8bf6a;"> &lt;/configuration&gt; </span><span style="color:#e8bf6a;"> &lt;/plugin&gt; </span><span style="color:#e8bf6a;"> &lt;/plugins&gt; </span><span style="color:#e8bf6a;">&lt;/build&gt;</span></pre> <p>Now, you can override default views of the formbuilder or socialsharing module&#39;s components. You can also try to add jnt_socialsharing/html/socialsharing.default.jsp or even&nbsp;<span style="line-height: 20.8px;">jnt_socialsharing/html/socialsharing.jsp.&nbsp;</span></p> <p>&nbsp;</p>

  • Number of messages  19
    Registration date Jan 22, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Override default view in Jahia 7

    by  rvt »  2016/01/28 22:14

    Additionally,

    you can also use the 'depndencies' tab in studio to archive this.
    This will automatically update your POM with the right dependency names.

  • Re: Re: Override default view in Jahia 7
    2016/01/28 22:14

    rvt <p>Additionally,</p> <p>you can also use the &#39;depndencies&#39; tab in studio to archive this.<br /> This will automatically update your POM with the right dependency names.</p> <p><img src="webkit-fake-url://bc7521fd-e9c7-45c2-a9d6-0ab7fd5b795b/image.tiff" /></p>

  • Number of messages  185
    Registration date Jan 28, 2016
    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