Page 1 of 1
Best technique for tabular content
Posted: Wed May 09, 2007 8:06 pm
by Anastasis
I am in an interim process of planning to migrate my employer's website to CMSMS and just scoping what needs to be done.
I would like some advice on the following draft page:
http://www.basle3.com/draft/template_detail_job.php
and in particular the table shown containing 5 rows and 2 columns.
The left-hand column contains static data labels common to all pages of this type.
The right-hand column will be dynamic data unique to each page.
My question is, would the technique for coding this in a CMSMS template to have each dynamic data item in the second column assigned as a separate content block (i.e. thereby creating 5 separate content panes in the admin user interface all for a small amount of data), or is there a better, more compact way of doing this.
Thanks in advance for your advice on this.
Re: Best technique for tabular content
Posted: Fri May 11, 2007 12:02 am
by Anastasis
Bump - please can anyone help with this?

Re: Best technique for tabular content
Posted: Fri May 11, 2007 6:39 am
by tsw
{content} tag has parameter oneline=false which could help if you want them on separate input fields.
I would probably try some of those jobmodules in forge to see if those can ease your page creation.
hope this helps
edit--
oneline=true of course

Re: Best technique for tabular content
Posted: Fri May 11, 2007 9:59 am
by Anastasis
tsw wrote:
{content} tag has parameter oneline=false which could help if you want them on separate input fields.
I would probably try some of those jobmodules in forge to see if those can ease your page creation.
hope this helps
edit--
oneline=true of course
TSW - that's absolutely perfect thank you! A very elegant solution.
Just one additional question related to this...
The last dynamic data item for these fields that is captured when entering the page content is the "Ref No". This as you can see is displayed on the page, but it is also used as a hidden field behind the Apply button. This value is passed to the receiving page.
See an example of the code below:
Code: Select all
<form enctype="multipart/form-data" method="post" action="Resourcing-UploadYourCV.php">
<p> </p>
<input type="hidden" value="CKCJ1304" name="reference"/>
<input type="submit" value=" Apply " name="Submit" style="position: relative; right: -122px; bottom: 0px;"/>
</form>
In other words, the "Ref No" data needs to be captured when the CMSMS user creates the page (e.g. CKCJ1304), but as well as being displayed in the table it needs to be output within the code to replace the value filled with x below:
Code: Select all
<input type="hidden" value="xxxxxxxx" name="reference"/>
without the need to enter it again. I am sure this can be done, but I am unclear about how to do it in CMSMS.
Thanks again in anticipation of your/someone's help with this.
Re: Best technique for tabular content
Posted: Fri May 11, 2007 10:03 am
by tsw
you could do something like
{capture name="refno" assign="my_refno"} {content block="refno" oneline="true"} {/capture}
after that you can use {$my_refno} to print it out anywhere you like
hope this helps
Re: Best technique for tabular content
Posted: Fri May 11, 2007 10:37 am
by Anastasis
TSW - thanks for that. Another perfect 10!
I really appreciate your help.