Personally I'd rather work with formatting (= templates) than mess with the kind of code you're posting there.
Consider the module Products. It doesn't have to deal with actual products - in one of my sites my "products" are portfolio items. You can set up fields you need and then can order by whatever field you want, or show just certain categories of items. And just ignore fields like price - that's the beauty of templates, you choose what fields you want to show.
Time spent learning how to drive Products (or the even more flexible ListIt2) is time well spent. I was sceptical at first but once you get to know them you'll be firing them up whenever you see a list of anything.
generate copies of similar tags
Re: generate copies of similar tags
Company Directory module: http://sportvereniging.zeijen.nu/contactpersonen
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: generate copies of similar tags
Totally agree with the above 2 suggestions ... 20 definitely needs a module. I'm sure any editors will thank you also.
However the following will work in the body (not sure about the same for content block declarations
Highly recommend checking out ... http://www.smarty.net/docs/en/ Smarty 3 that CMSMS uses has some great features.
However the following will work in the body (not sure about the same for content block declarations
Code: Select all
{for $i=1 to 20}
{if $nm{$1}}
//employee i bio
{/if}
{/for}
Re: generate copies of similar tags
Agreed!Totally agree with the above 2 suggestions ... 20 definitely needs a module. I'm sure any editors will thank you also.
Also the content block param MUST be URL friendly, ie no spaces. That's what the label param is for, eg {content block='name_1' label='Name 1'...}