Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello again! after some time without theming on javascript drupalgap, i was asked to made some changes on my application. For example i have a form and an ul, in the form i could add a title at the start with this code:
form.prefix = '<h2>BUSCADOR</h2>';
But now i want to do the same with the ul made with this code:
var content = {};
content['listado_de_informes'] = {
theme: 'view',
pager_pos: 'bottom',
format: 'ul',
path: 'drupalgap/listado-de-informes',
row_callback: 'my_module5_informes_row',
empty_callback: 'my_module5_informes_empty',
attributes: {
id: 'listado_de_informes_view'
}
};
return content;
The problem i have is that if i add a markup on the code the content dissapears.
Is any way to put the markup in the same div as the ul like a prefix?
Example:
TITLE (that's what i am missing)
List:
item1
item2
item3
Thanks in advance!!!
Comments
Comment #2
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedHave you tried putting a title on the Views Render Array? For example:
Comment #3
HomerO CreditAttribution: HomerO commentedTried that but it puts the title con top of the page, i have set a title on top of the form, what i try to achieve is to put another after de form and before the ul li.
Comment #4
HomerO CreditAttribution: HomerO commentedThis is my full module code, if you need it. I need to put the title/markup before the first row of the ul render, tried using the array but it puts on top of the page.
Comment #5
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedYou could try checking the
row._position
value for when it is0
, and then you could put something immediately before the first list item, although it'd be inside the list itself though.