Modifying title in feature page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Modifying title in feature page

Sudhansu Dash-2
Hello,
In our gene feature page I have a panel called 'Expression' coming from the tripal_analysis_expression module. 
This comes from the '#tripal_toc_title' => 'Expression' defined in $node->contents array  in the hook_node_view. The effect of this is that it appears as the panel label as well as the page title.

I want to have the page title for this panel modified to 'Expression ($feature->name)' while keeping the panel label unaltered.
How do I accomplish that?  Is there another markup element like '#tripal_toc_title' that specifies the page title that I can define here?
Even suppressing the page title while not affecting the panel label would serve my purpose.
(I have already tried putting '($feature->name)' below the page title: It works but not what I ideally want to do.)

Thanks.

Sudhansu Dash


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal
Reply | Threaded
Open this post in threaded view
|

Re: Modifying title in feature page

Abdullah Almasaeed
Hello Sudhansu,

Using some javascript would solve your issue. If you have jQuery installed, this code snippet will work if placed in the tripal_feature_expression.tpl.php template file. You can place it anywhere since it will execute after the page has loaded.

<script>
 $(function() {
   $('.figure-tripal-data-pane-title.tripal-data-pane-title').html('Expression <?php echo $feature->name?>')
 })
</script>

I hope that helps! Please let us know if we can assist you any further.

Thanks,
Abdullah Almsaeed
Staton Lab - UTK

> On Feb 16, 2017, at 5:13 PM, Sudhansu Dash <[hidden email]> wrote:
>
> Hello,
> In our gene feature page I have a panel called 'Expression' coming from the tripal_analysis_expression module.  
> This comes from the '#tripal_toc_title' => 'Expression' defined in $node->contents array  in the hook_node_view. The effect of this is that it appears as the panel label as well as the page title.
>
> I want to have the page title for this panel modified to 'Expression ($feature->name)' while keeping the panel label unaltered.
> How do I accomplish that?  Is there another markup element like '#tripal_toc_title' that specifies the page title that I can define here?
> Even suppressing the page title while not affecting the panel label would serve my purpose.
> (I have already tried putting '($feature->name)' below the page title: It works but not what I ideally want to do.)
>
> Thanks.
>
> Sudhansu Dash
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
> Gmod-tripal mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gmod-tripal


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gmod-tripal mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-tripal