How to make a table in a content item?

More
12 years 1 month ago #43646 by gkhn
Finally got something working
It took me a while but this is exactly what i needed..
Code:
<?php if ((isset($item->positions['tablehead'] ) ) ) : ?> <div class="row"> <div class="col-sm-12"> <div class="table-responsive"> <table class="table table-bordered table-hover"> <?php foreach ($item->positions['tablehead'] as $field) : ?> <thead> <tr> <?php echo $field->display; ?> </tr> </thead> <?php endforeach; ?> <?php endif; ?> <tbody> <tr> <?php if ((isset($item->positions['tablerow1col1'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow1col1'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow1col2'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow1col2'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow1col3'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow1col3'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow1col4'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow1col4'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> </tr> <tr> <?php if ((isset($item->positions['tablerow2col1'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow1col1'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow2col2'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow2col2'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow2col3'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow2col3'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow2col4'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow2col4'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> </tr> <tr> <?php if ((isset($item->positions['tablerow3col1'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow3col1'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow3col2'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow3col2'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow3col3'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow3col3'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow3col4'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow3col4'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> </tr> <tr> <?php if ((isset($item->positions['tablerow4col1'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow4col1'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow4col2'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow4col2'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow4col3'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow4col3'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow4col4'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow4col4'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> </tr> <tr> <?php if ((isset($item->positions['tablerow5col1'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow5col1'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow5col2'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow5col2'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow5col3'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow5col3'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> <?php if ((isset($item->positions['tablerow5col4'] ) ) ) : ?> <td> <?php foreach ($item->positions['tablerow5col4'] as $field) : ?> <?php echo $field->display; ?> <?php endforeach; ?> </td> <?php endif; ?> </tr> </tbody> </table> </div> </div> </div>

Loading each column with a different text area :)

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #43652 by igcorreia
Once you enter the FC framework you can do everything.

YOu only need to understand the framework and all the possible feature and combinations. Glad you made :)

Now I am struggling.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #43655 by gkhn
It is awesome. Flexicontent is just what I have been looking for.

Just a simple case for example.

I have got a location page.GOogle maps and some contact info.
So what happens if an user needs to add google maps to their website. All those {googlemaps/} plugin triggering things you have to put it inside your article.. They dont even make sense
Let say you are ok with that. You need to make sure it is actually displayed correctly. So you start playing with wyswig editor which messes up more...

I like the fact that you can have independent fields which do not attack each other instead they work together nicely!

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #43657 by igcorreia
Me tooo :)

And custom templates and custom modules.

Check this one I am making right now:

j.mp/1fWqTf4

I am making now special offers similar to groupn rigth here: j.mp/18Ue3P3

I have a custom field in the footer only to show STARS :)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save