Vivvo CMS Support Forum Home | Free Trial | Online Demo | Docs and Manuals | Order Now   

Go Back   Vivvo CMS Support Forums > Vivvo 4 > Troubleshooting

Troubleshooting Problems, need help? Have a tip or advice? Post it here.

Reply
 
Thread Tools Display Modes
Old 06-27-2012, 07:54 PM   #1
srqwebguy
Vivvo User
 
Join Date: Jul 2008
Posts: 32
Rep Power: 0
srqwebguy is on a distinguished road
Default Excluding Categories in Newsletters

Hi,

I'm reaching out because after setting this up; I am unable to make a newsletter that excludes the category title if there's no article for the day.

I have a feeling that <vte if=> would come into play, but not sure how to input it.

I have tried to embed the sample code here, but it is causing a 500 Server error, even when I embed in CODE tags....

Appreciate any help! Thanks.

Update - I was able to get it to accept the code using the PHP tags in the post below - but for some reason any other text in that post generated a server error. Strange.....

Last edited by srqwebguy; 06-27-2012 at 07:58 PM.
srqwebguy is offline   Reply With Quote
Old 06-27-2012, 07:56 PM   #2
srqwebguy
Vivvo User
 
Join Date: Jul 2008
Posts: 32
Rep Power: 0
srqwebguy is on a distinguished road
Default

PHP Code:
[CODE]<vte:template>
<
vte:include file="{VIVVO_TEMPLATE_DIR}box/topad.tpl" />
<
vte:box module="box_sections">
                            <
vte:template>
                                <
vte:for from="{categories}" step="1" key="category_index">
                                    <
vte:foreach item "category" from "{categories}" loop="1" start="{category_index}">
                                        <
h1><vte:value select="{category.get_category_name}" /></h1>
                                        <
vte:box module="box_article_list">
                                            <
vte:params>
                             <
vte:param name="search_search_date" value="1" />
                             <
vte:param name="search_before_after" value="1" />
                             <
vte:param name="search_sort_by" value="created" />
                                <
vte:param name="search_order" value="descending" />
                             <
vte:param name="search_limit" value="5" />
                             <
vte:param name="search_cid" value="{category.id}" />
                                                      <
vte:param name="exclude_printed" value="true" />
                                            </
vte:params>
                                            <
vte:template>
                                                <
ul>
                                                    <
vte:foreach item "article" from "{article_list}">
                                                                <
vte:include file="{VIVVO_TEMPLATE_DIR}summary/default.tpl" />
                                                    </
vte:foreach>
                                                </
ul>
                                            </
vte:template>
                                        </
vte:box>
                                    </
vte:foreach>
                                </
vte:for>
                            </
vte:template>
                        </
vte:box>
   <
vte:include file="{VIVVO_TEMPLATE_DIR}box/sideads.tpl" />                      
  </
vte:template>
[/
CODE
srqwebguy is offline   Reply With Quote
Old 06-28-2012, 09:49 AM   #3
jasmina
Administrator
 
Join Date: Jul 2007
Posts: 243
Rep Power: 10
jasmina is on a distinguished road
Default

This error can be caused by a too restrictive setup of the mod_security module, in case it's installed on your server. So, first I would suggest to contact your server administrator and ask him to check the mod_security rules for you.
jasmina is offline   Reply With Quote
Old 06-28-2012, 08:50 PM   #4
srqwebguy
Vivvo User
 
Join Date: Jul 2008
Posts: 32
Rep Power: 0
srqwebguy is on a distinguished road
Default

Thanks Jasmina, but I think you might have misunderstood. The 500 Server error was on THIS site, vivvo.net, when I was trying to post the code now found in the 2nd post in this thread. The problem we are having is using the newsletter module.

When we send an email, it lists categories regardless of whether there is a story listed or not. How can we override this so that it the email does not show an empty category? The template code we are using is listed above.

Thanks.
srqwebguy is offline   Reply With Quote
Old 06-30-2012, 09:16 PM   #5
bobster65
Vivvo Veteran
 
Join Date: Aug 2008
Location: Big Sky Country
Posts: 579
Rep Power: 5
bobster65 is on a distinguished road
Default

This will do the trick for ya. Simply move the H1 down into a if check within the articles box module. Check the articles array and only print it out if there are articles..

Code:
<vte:template> 
	<vte:include file="{VIVVO_TEMPLATE_DIR}box/topad.tpl" /> 
		<vte:box module="box_sections"> 
			<vte:template> 
				<vte:for from="{categories}" step="1" key="category_index"> 
					<vte:foreach item = "category" from = "{categories}" loop="1" start="{category_index}"> 
						<vte:box module="box_article_list"> 
							<vte:params> 
								<vte:param name="search_search_date" value="1" /> 
								<vte:param name="search_before_after" value="1" /> 
								<vte:param name="search_sort_by" value="created" /> 
								<vte:param name="search_order" value="descending" /> 
								<vte:param name="search_limit" value="5" /> 
								<vte:param name="search_cid" value="{category.id}" /> 
								<vte:param name="exclude_printed" value="true" /> 
							</vte:params> 
							<vte:template>
								<vte:if test="{article_list}">
									<h1><vte:value select="{category.get_category_name}" /></h1> 						
									<ul> 
										<vte:foreach item = "article" from = "{article_list}"> 
											<vte:include file="{VIVVO_TEMPLATE_DIR}summary/default.tpl" /> 
										</vte:foreach> 
									</ul> 
								</vte:if>								
							</vte:template> 
						</vte:box> 
					</vte:foreach> 
				</vte:for> 
			</vte:template> 
		</vte:box> 
	<vte:include file="{VIVVO_TEMPLATE_DIR}box/sideads.tpl" />                       
</vte:template>
bobster65 is offline   Reply With Quote
Old 07-03-2012, 03:20 PM   #6
srqwebguy
Vivvo User
 
Join Date: Jul 2008
Posts: 32
Rep Power: 0
srqwebguy is on a distinguished road
Default

That worked! Thank you.
srqwebguy is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Order now:

Order your copy of Vivvo now and get:
bullet Six months free upgrades
bullet Free support
bullet Full source code
bullet Immediate download
bullet Starting at only $295.00
Order now

Support HelpDesk:

You can submit a trouble ticket in the support area at any time, using your client area email and password.

Vivvo CMS Resource Center:

The Vivvo CMS Resource Center is your window to a variety of resources that showcase Vivvo's features and technologies. So whether you're brand new to Vivvo or a seasoned user, you can find the information you need right here!

Latest Additions:

Contact us:

Business hours
Mon-Fri 9:00AM - 6:00PM GMT+1
(Europe)
Telephone Sales
381 11 311-50-20
Email inquiries
sales@vivvo.net
(Sales inquiries)
support@vivvo.net
(Support inquiries)

All times are GMT +1. The time now is 12:13 AM.
Contact Us - Vivvo Home - Archive - Privacy Statement - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.