Hello all,
I’m wondering how to apply a header and/or footer template to a blank application. In the Layout section of a blank application, the user can select only the theme. Is there any way to do it by code?
Thanks
Hello all,
I’m wondering how to apply a header and/or footer template to a blank application. In the Layout section of a blank application, the user can select only the theme. Is there any way to do it by code?
Thanks
I never use it. But you can try the macro:
/*
blank applications are the most empty one, they used for coding, api, testing, things like that. it is logical there is no header as there is nothing
you just echo html and css , whatever you like in your onexecute. this is close as it gets to plain php programming,
you can find a lot of examples on internet
take a look at control applications if you have visual design requirements, they a kind of blank but you can manage php, html, css and javascript parts separately.
Thank you guys for your replies.
@alvagar: theme is already settable and it is the only layout parameter available in the settings of a blank application. But unfortunately this doesn’t build up header and footer
@maximnl: I totally agree with your arguments. I have a dynamic number of form fields and of a certain type to create, depending on parameters coming from DB. If for instance amount = 5 and type = checkbox then the form needs five form fields of type checkbox. So this must be a very flexible construct.
I supposed a blank application is the right container to code this. But I wanted to take advantage of the header and footer created in the HTML templates. Anyway, I will think about dealing with it and renounce using the header and footer.
Or do you think I can achieve the same result by using a control? Is it possible to create fields in there at runtime? I did check in the documentation and looked in the forum for a while, but I didn’t find anything in order to create a field in the .
By the way (maybe not fully related to the topic, sorry for that), do you know a way to create a link that can be used in parts of grid contents, opening an application in modal way?
sc_link can be used only for a full column content and sc_make_link does not have any target parameter.
Thanks a lot!
for forms i would use control application cause it is easier to style etc
dynamic number of fields is unusual design, r u sure you do not want to treat it as a sub table/form with multiple records (=number of your fields)
you can generate any html controls using php code in OnLoad event to set up arrays and variables , and outputting them in the HTML part of the control application using loops.
this code outputs arbitrary number of uploaded images for a order
foreach ($myArrayImages as &$row1) {
if ($row[0]==$row1[0]) {
if($first==1) {$hasImages=1;echo '<tr> <td colspan="2">';}
$size=‘215px’;
if ($row1[2]==1){$size=‘430px’;}
if ($row1[2]==2){$size=‘860px’;}
echo “”;
if($first==1) { ;$first=0;}
}
}
if($hasImages==1) { echo "</td></tr>";}
} ?>
<?php if($row[8]>'' && $row[8]<>$prevAlg){ $prevAlg=$row[8]; ?>
<tr > <td><?= $AlgemeenLable ?> :</td> <td><?= $row[8]; ?> </td> </tr>
<?php } ?>
</tbody>
</table>
making links sucks, the standard interface has more option like modal and menu tabs, but i could not find how to code it via sc make link, it is just _target, self and something else. parent or something. so if it really important try to do it via a standard button with a link, so you can set all things up via the link parameters.
good luck