Wrong code in the box contents!

26 views
Skip to first unread message

grandm...@gmail.com

unread,
Aug 10, 2013, 10:41:30 AM8/10/13
to vam...@googlegroups.com
Hello. I want to make a tag for title, but get an error:

Wrong code in the box contents!

An Internal Error Has Occurred.
Error: An Internal Error Has Occurred.

Package contents:

<?
$title;
if ($_SERVER["REQUEST_URI"] == '/') {
$title == '{site_name}';
}
else {
$title == '{page_name} - {site_name}';
}
?>

VamCart

unread,
Aug 10, 2013, 10:59:51 AM8/10/13
to vam...@googlegroups.com
Hi!

Add new tag in Admin - Extensions - User Tags

Don't use <? and ?>

Just add php code.

Then add your new tag in ant template like this - {user_tag alias='your-tag-alias'}

grandm...@gmail.com

unread,
Aug 10, 2013, 12:40:40 PM8/10/13
to vam...@googlegroups.com
Thanks! I called the wrong tag =)

VamCart

unread,
Aug 10, 2013, 2:06:56 PM8/10/13
to vam...@googlegroups.com
But the correct way - using smarty for this.

You can use code like this in your template without any user tags or php code:

{if $smarty.server.REQUEST_URI == '/'}
{$site_name}
{else}
{page_name} - {site_name}
{/if}

Reply all
Reply to author
Forward
0 new messages