<class> warfare, css, and the line break...

mrgreg

New Member
that would not go away.

I have spent the better part of 3 days in templates, css, core files, php, etc and cannot shake a line break.
Imagine my elation when I stumbled into some group templates that I had missed somehow.

But alas, in every rendition of the variables with every css style in every template- including those stripped down to bare bones the line breaks remain.

I am defeated to this regard. Granted, I am about green as they come in this stuff, but it is not for a lack of trying.

In this (my last feeble attempt):
echo $this->_row->data->jos_fab_ven_atts___wheelchair , $this->_row->data->jos_fab_ven_atts___camping;

How do I lose the line break?
css and php in any flavor has not done it...

TYIA
 
Not sure what you are looking for or what you mean.
'pure' divs are displayed below each other.
You can use css like display:inline or float:left or the spanX bootstrap classes or css positioning to display side by side

gesendet mit Tapatalk
 
Hi T,
I'm still not sure why styling was causing that which lead me down my ill conceived path but the ultimate problem appears to be that I was trying to force the 'List' view to do that which it wasn't intended. Not without a re-write anyway.
That said I have moved my efforts to a 'Details' view. Oddly enough the 'Form' view was adopting my template styles which was good. So let us see how it ends...


Thanks!
 
Well, I suppose a picture is worth a thousand words.
I have created a mock-up this morning showing that which is eluding me.

Put simply, how do I render checkbox selections in the same manner that dropdown selections are rendered.
The key seems to be in \components\com_fabrik\models\elementlist.php, though I cannot say for certain. Perhaps I am overlooking something else?

This mock-up:
Code:
<strong>Example rendering: dropdowns, raw</strong><br />
<?php echo $claydirtoffroad , $claydirtoval , $pavedonroad , $pavedoval , $indoorcarpet;?                                   >
<br /><br />
 
<strong>Example rendering: single checkboxes, raw</strong><br />
<?php echo $roar , $wheelchair;?>
<br />
 
<strong>Example rendering: dropdowns, dressed</strong><br />
<?php echo $path_img , $claydirtoffroad , $spaced, $path_img , $claydirtoval , $spaced, 
$path_img , $pavedonroad , $spaced, $spaced , $path_img , $pavedoval , $spaced,                                             $path_img , $indoorcarpet , $spaced;?>
<br /><br />
 
<strong>Example rendering: single checkboxes, dressed</strong><br />
<?php echo $path_img , $roar , $path_img , $wheelchair;?>
<br />
 
<strong>Example rendering: mixed, raw</strong><br />
<div class= "span3">
<?php echo $claydirtoffroad;?>
</div>
<div class= "span3">
<?php echo $claydirtoval;?>
</div>
<div class= "span3">
<?php echo $roar;?>
</div>
<div class= "span3">
<?php echo $wheelchair;?>
</div>
<div class= "span">
<?php echo $edit;?>
</div>

Creates this:
Image3.png
 
We are currently in the process of moving all element rendering into JLayout files, so they are all over-rideable:

http://fabrikar.com/forums/index.php?wiki/jlayouts/

However, the checkbox element is one of the few that we haven't gotten round to doing this for yet, so it's still using the hard-wired layout in the elementlist.php model.

I'll talk to rob early next week and see if we can get that done. I would do it this weekend, but I'm not 100% sure on how we should go about this, as the layout really needs to be done at the individual element models that extend elementlist, not in the main elementlist itself, so I need his input on the best way to approach that.

So if you can wait a few days, I think we can get that done so you can override the checkbox layout with whatever you want.

-- hugh
 
That is awesome!
I had concluded a couple of days ago that I was just an idiot who had lost his mind. Well, that might be true anyway. LOL

I can tell you this about it though- moving things around, changing things, and chopping out huge chunks of code in elementlist.php did not work. LOL again.
 
Also, related to checkboxes?

<?php if (!empty($otheracts_raw)) {
Always returns true

<?php if ($otheracts_raw != '[""]') {
Returns true or false
 
Yeah, I'd stay out of elementlist.php if I was you. :)

To quote the label they stick inside consumer electronics cases ... "No user serviceable parts beyond this point".

-- hugh
 
Also, related to checkboxes?

<?php if (!empty($otheracts_raw)) {
Always returns true

<?php if ($otheracts_raw != '[""]') {
Returns true or false

Well, you answered your own question. An "empty" selection is still represented as a JSON array, just with no content, so it's [""], instead of ["1","3"] or whatever. And [""] isn't "empty()" as far as PHP is concerned. Only the empty string, numeric 0, boolean 'false' etc. are empty(), not the literal string '[""]'.

-- hugh
 
PS ... I'm trying to get Rob's attention right now, to ask him the best way to go about converting the elementlist model to use JLayout.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top