Re: Xaraya_Classic theme menu blocks logic
Fournier Daniel <[email protected]> Tue, 04 May 2004 14:02:44 +0200
| Newsgroups | gmane.comp.cms.xaraya.ui |
|---|---|
| Organization | Xaraya News Server |
| Message-ID | <[email protected]> |
Andy Varganov wrote:
> Fournier Daniel wrote:
>
>> However, I don't think this extra markup will make a noticeable
>> latency on the client side.
>
>
> no, in practice it wont.. however, serving clients 'empty' structures,
> like the table cells in your example, is a big NO-NO in my books :)
> that's why i completely re-wrote the 1st version of xaraya_classic (see
> early 0.9+ releases for comparison) in order to achieve the 'cleanest
> possible' output.
>
>> For instance, if I have no left menu, I get this line (<head/> child):
>> <style>td#leftmenus { display:none; }</style>
>
>
> i suspect you're after a dynamic css but we simply dont have a 'nice'
> official solution for it in xaraya yet.. although it doesnt stop you
> from experimenting.
>
>> These 3 uneeded elements to parse on client side are nothing compared
>> to the tens of elements to be parsed on server side to decide what is
>> the exact output.
>
>
> not sure i could see the problem on the server side - template is
> compiled before it's served to a client, there is nothing extra to
> parse. The logic is as follows: no content -> no output -> no
> unnecessary structures to fly about and pollute clients rendering engines.
>
>> But the main benefice is clearly in the template readability: no
>> duplication of code, which is always error prone when you want to
>> modify something.
>
>
> see above, at this stage i'd care much more about the structure of
> output than about the structure of template, but i'm not arguing that
> having both sorted out would be nice too :)
>
> Andy
That's meaningful.
Anyway, isn't possible to have a simpler solution:
<table id="classiccontentarea">
<tr>
<xar:if condition="!empty($leftblocksgroup)">
<td id="leftmenus">
<div id="leftmenuswrapper">
<div class="iewintablefixer">
<xar:var name="leftblocksgroup"/>
</div>
</div>
</td>
</xar:if>
<td id="maincontent">
<div class="iewintablefixer">
<xar:var name="centerblocksgroup"/>
<xar:module class="modulespace" main="true" />
</div>
</td>
<xar:if condition="!empty($rightblocksgroup)">
<td id="rightmenus">
<div id="rightmenuswrapper">
<div class="iewintablefixer">
<xar:var name="rightblocksgroup"/>
</div>
</div>
</td>
</xar:if>
</tr>
</table>
or, even cleaner, getting rid of the table layout:
<div id="classiccontentarea">
<xar:if condition="!empty($leftblocksgroup)">
<div id="leftmenus">
<!-- throw away IE table deficiency -->
<xar:var name="leftblocksgroup"/>
</xar:if>
<div id="maincontent">
<xar:var name="centerblocksgroup"/>
<xar:module class="modulespace" main="true" />
</div>
<xar:if condition="!empty($rightblocksgroup)">
<div id="rightmenus">
<xar:var name="rightblocksgroup"/>
</div>
</xar:if>
</div>
Daniel