I use Delphi xe8 in combination with Intraweb 14.1.13. In my intraweb application I use HTML templates after bootstrap mode.
How do I have to insert (settting) a TIWBSRegion/TIWRegion into an HTML template that has some elements inside it?
Elements (TIWLabel/TIWBSLabel, …) lose their format! But if they are not within TIWBSRegion/TIWRegion, the form is OK.
I also tried to use IWBootstrap elements, but not help.
Part of HTML template:
<div class="container-fluid">
<div class="row">
{%MyIWBSRegion%}
<div class="col">
<h1><span class="badge badge-info">{% MyIWBSLabel0%}</span></h1>
<h2>{%MyIWBSLabel1%}</h2>
<h2>{% MyIWBSLabel2%}</h2>
</div>
</div>
</div>
Can you minimize this to a simple ready to run demo? The code snippet alone isn't enough for me to determine the issue.
Does the same code function as expected without the template?
Can you attach or show the template?
(03-08-2019, 02:15 PM)kudzu Wrote: [ -> ]Can you minimize this to a simple ready to run demo? The code snippet alone isn't enough for me to determine the issue.
Does the same code function as expected without the template?
Can you attach or show the template?
A small example my problems! I have TIWRegion (MyRegion) inside TWLabel (MyLabel1). HTML template edits format this MyLabel1. Outside MyRegion i have MyLabel2 with correct format from HTML template.
Problem is MyLabel1!
How set up (property) TIWRegion/TWLabel?
Where put MyRegion in HTML template? Without TIWRegion in HTML template hide TIWLabel....
Thank you for the project. Somehow this slipped through my new feed and I didn't see it. I've asked someone to look at this urgently.
Hi Matija. Move your
class="label label-danger" from html to your MyLabel1 in object inspector Css ->
label label-danger. After this doesn't matter you put your label, inside/outside regions, etc.
[
attachment=85]
(03-20-2019, 03:16 PM)Jose Nilton Pace Wrote: [ -> ]Hi Matija. Move your class="label label-danger" from html to your MyLabel1 in object inspector Css -> label label-danger. After this doesn't matter you put your label, inside/outside regions, etc.
Thx for answer. I know that but not solve my problem! My HTML template it regulates not only position but also format of IW components.
My sample format:
{%MyRegion%}
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<h5><span class="badge badge-info">{%MyLabel1%}</span></h5>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<h5><span class="badge badge-info">{%MyLabel2%}</span></h5>
</div>
</div>
Work outside {%MyRegion%}! In my TForm, I have many IW components have in the regions (TIWRegion).
You are trying to use a control TWICE in a template.
MyLabel1 is in the region. When you use {%MyRegion%} it embeds the whole region including contents. You then again explicitly reference {%MyLabel1%}. This causes MyLabel1 to try to be rendered twice into the same page which is invalid.
<h1>Sample</h1>
<div class="row">
{%MyRegion%}
<div class="col">
<p class="label label-danger">{%MyLabel1%}</p>
<p class="label label label-info">{%MyLabel2%}</p>
</div>
</div>
(03-07-2019, 10:39 AM)matija Wrote: [ -> ]I use Delphi xe8 in combination with Intraweb 14.1.13. In my intraweb application I use HTML templates after bootstrap mode.
How do I have to insert (settting) a TIWBSRegion/TIWRegion into an HTML template that has some elements inside it?
Elements (TIWLabel/TIWBSLabel, …) lose their format! But if they are not within TIWBSRegion/TIWRegion, the form is OK.
I also tried to use IWBootstrap elements, but not help.
Part of HTML template:
<div class="container-fluid">
<div class="row">
{%MyIWBSRegion%}
<div class="col">
<h1><span class="badge badge-info">{% MyIWBSLabel0%}</span></h1>
<h2>{%MyIWBSLabel1%}</h2>
<h2>{% MyIWBSLabel2%}</h2>
</div>
</div>
</div>
Hi,
I tested your example but I'm kind of confused about the expected outcome. How do you expect this to be rendered?
Your labels have all StyleRenderOptions settings set to false. This means that no style will be rendered for them. In that case, everything should be controlled by a style sheet provided by you, but I don't see any. So, I'm wondering how do you expect them to be in the final HTML....
(03-24-2019, 08:24 AM)Alexandre Machado Wrote: [ -> ] (03-07-2019, 10:39 AM)matija Wrote: [ -> ]I use Delphi xe8 in combination with Intraweb 14.1.13. In my intraweb application I use HTML templates after bootstrap mode.
How do I have to insert (settting) a TIWBSRegion/TIWRegion into an HTML template that has some elements inside it?
Elements (TIWLabel/TIWBSLabel, …) lose their format! But if they are not within TIWBSRegion/TIWRegion, the form is OK.
I also tried to use IWBootstrap elements, but not help.
Part of HTML template:
<div class="container-fluid">
<div class="row">
{%MyIWBSRegion%}
<div class="col">
<h1><span class="badge badge-info">{% MyIWBSLabel0%}</span></h1>
<h2>{%MyIWBSLabel1%}</h2>
<h2>{% MyIWBSLabel2%}</h2>
</div>
</div>
</div>
Hi,
I tested your example but I'm kind of confused about the expected outcome. How do you expect this to be rendered?
Your labels have all StyleRenderOptions settings set to false. This means that no style will be rendered for them. In that case, everything should be controlled by a style sheet provided by you, but I don't see any. So, I'm wondering how do you expect them to be in the final HTML....
Ok, again!
In sample3.zip i have 3 IWForms. IWForm1 without HTML template, IWForm2 and IWForm3 with HTML template (in App Path\Templates).
Good IWForm2 (no IWRegions) accepts the position and format of the HTML template (IWForm2.html).
IWForm3 (with IWRegions) NOT accepts the position and format of the HTML template (IWForm3.html).
My target good IWForm3 with right position and format as defined HTML template!
I do NOT want to define CSS in IW component properties. I deliberately did NOT change the StyleRenderOptions.
Otherwise, I can not explain.
Note that Intraweb 14.1.13 is also quite an old version.
Are you using a bundled license or an old license?