NEWS MODULE - different output based on category Topic is solved

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
webform
Power Poster
Power Poster
Posts: 471
Joined: Sat Nov 25, 2006 3:39 pm
Location: Copenhagen, Denmark

Re: NEWS MODULE - different output based on category

Post by webform »

Good to hear it's working for you.

You can also use {cycle} to set your text alignment. But you maybe need to use the name attribute so they don't conflict with each other.

Maybe something like this [untested]:

Code: Select all

<!-- Start News Display Template -->
{foreach from=$items item=entry}

	<div class="row{cycle name='reverse' values=' flex-md-row-reverse,'} justify-content-center no-gutters press-black mb-5 mb-lg-0">

		<div class="col-lg-6">
			...
			<div class="project-text w-100 my-auto text-center{cycle name='aligment' values=' text-lg-right,'}">
				...
			</div>
			...
		</div>

		<div class="col-lg-6">
			...
		</div>

	</div>

{/foreach}
You proberly have to experiment what side of the , delimiter to place the value, so you get the result you need.
https://www.smarty.net/docsv2/en/langua ... .cycle.tpl
Post Reply

Return to “Modules/Add-Ons”