Please note that Form2Content is no longer being developed. All files from the latest version can be found on Github.

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Eliza
  2. F2C article templating
  3. Wednesday, 06 April 2016
  4.  Subscribe via email
Joomla version 3.5.1, Form2Content Pro version 6.13.0
Can you provide the simplest of code to show how I would for example put two text edit boxes in an article to behave responsively - ie two column layout in xl,lg and md screens and stacked columns in sm and xs devices. I would expect to be able to add something like this:

{if $MAIN}
<div class="container">
{*PLEASE NOTE: We are using the RAW output for displaying the image. If NO image is uploaded, nothing will be shown.*}

{if $IMAGE}<img src="{$IMAGE}" align="right" style="padding-left:10px;" alt="{$JOOMLA_TITLE}" />{/if}

<p>this is the start of the text</p>

<div class="row">
<div class="col-sm-6">
{$MAIN}
</div>
<div class="col-sm-6">
{$MAIN2}
</div>

</div>







<div style="clear:both;"></div>
</div>
{* The following code is an example of using conditional statements*}

{if $JOOMLA_INFORMATION eq '1'}
<div style=" padding:5px; border:1px solid #999; width:98%; margin:10px 0; clear:both;">

<span style="font-size:90%;">
Artice title: {$JOOMLA_TITLE}<br/>
Title alias: {$JOOMLA_TITLE_ALIAS}<br/>
Article URL (raw output, great for custom 'read more'): <a href="{$JOOMLA_ARTICLE_LINK}" target="_blank">{$JOOMLA_ARTICLE_LINK}</a><br/>
Joomla Article ID: {$JOOMLA_ID}<br/>
Start publishing: {if $JOOMLA_PUBLISH_UP}{$JOOMLA_PUBLISH_UP}{else}empty{/if}<br/>
Stop publishing: {if $JOOMLA_PUBLISH_DOWN}{$JOOMLA_PUBLISH_DOWN}{else}empty{/if}<br/>
Article create date: {$JOOMLA_CREATED}<br/>
Article modified date: {$JOOMLA_MODIFIED}</span>
</div>
{elseif $JOOMLA_INFORMATION eq '2'}
<p>No extra information available.</p>
{else}
<p>No option to display additional information was made.</p>
{/if}



{/if}


However the content for MAIN and MAIN2 does not behave responsively. I am a newby with F2C and finding it quite hard to understand the templating - I am using Prostar as the template with Joomla
Responses (3)
Accepted Answer Pending Moderation
Hi Eliza,

Thanks for using F2C!

If you like to make responsive columns within your article html you need to understand the html of this. Form2Content is a tool and doesn't do this for you.
I like to point you in the right direction but I can't teach you responsive html on this forum.

1) Follow the step by step instructions to understand how F2C works and how your form field data parsed into the F2C article templates. Start with simply adding the two text areas in a form and into your template.
http://documentation.form2content.com/f2c-getting-started/32-getting-started-f2c-step-by-step

2) It's easiest to use a UI framework for responsive layout. Think of Uikit or bootstrap and decide which one you want to use.

3) Add the grid/responsive column layout of the UI framework to your F2C template.

Hope this helps!

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 1
Accepted Answer Pending Moderation
Thank you for your prompt reply. I understand completely how to write html for bootstrap. My issue was with the fact that I had tried to include a two column grid using the default template Prostar that ships with Joomla on a test site of mine to experiment with F2C and could not get it to work. I have subsequently loaded a fully responsive template that I have used many times before with Joomla (Joostrap Base template) and I can now get my responsive grid to work fine - suggesting that the issue is with Prostar... However I do think it would be really helpful to include a few more template examples for those us new to F2C.
  1. more than a month ago
  2. F2C article templating
  3. # 2
Accepted Answer Pending Moderation
Hi Eliza,

A bit of a late reply, sorry. Glad you got if working. I am using Gist more and more to add examples.
https://gist.github.com/Form2Content

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. F2C article templating
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.