dr-dan
26 Oct 2012, 3:02 AM
I am bemused about the assumption that all Components must be wrapped in some tag (autoEl: default div)
This is screwing up my css. Is there anyway to suppress the autoEl, or is there another base class I can use? I would have thought this was a common scenario:
A parent component renders some markup (via a template), loads another component which is a template-generated html fragment (not an element/node) and injects the child html into one of its own tags/containers.
I have some list items in the parent, i want to inject a reusable sub-menu into one of the list items, which is a href followed by a new ul. but with the autoEl div component wrapped around it, it blows my supplied css.
Parent:
renderTpl: [
'<ul class="info">',
''<li id="cultureMenu-li" class="lang"></li>'
...
]
Child:
renderTpl: [
'<a href="#" class="langitem">{currentCultureText}</a>',
'<ul>',
'<tpl for="otherCultures">',
'<li><a href="/Locale/{code}">{text}</a>',
'</tpl>',
'</ul>'
]
This is screwing up my css. Is there anyway to suppress the autoEl, or is there another base class I can use? I would have thought this was a common scenario:
A parent component renders some markup (via a template), loads another component which is a template-generated html fragment (not an element/node) and injects the child html into one of its own tags/containers.
I have some list items in the parent, i want to inject a reusable sub-menu into one of the list items, which is a href followed by a new ul. but with the autoEl div component wrapped around it, it blows my supplied css.
Parent:
renderTpl: [
'<ul class="info">',
''<li id="cultureMenu-li" class="lang"></li>'
...
]
Child:
renderTpl: [
'<a href="#" class="langitem">{currentCultureText}</a>',
'<ul>',
'<tpl for="otherCultures">',
'<li><a href="/Locale/{code}">{text}</a>',
'</tpl>',
'</ul>'
]