Joomla 3.2 BLOG Layout


Author Message
Eileen
Artisteer Team

Posted: 11/25/2013
Quote message 

Hello Alexandros,
it is a known issue and Artisteer team is working on a solution. The fix will be available in the next Joomla export plugin update.
 
Roli

Posted: 11/28/2013
Quote message 

Hello
I have the same problem, when could we get the solution?
Regards Roli
 
Micha

Posted: 12/2/2013
Quote message 

i got this problem after updating artisteer and re-export again.

is there any help?


 
Alexandros

Posted: 12/4/2013
Quote message 

Gerd,

I just exported the artisteer and install it on Joomla 3.2, I still have the same issue. It seems the Artisteer team is still working for a fix?

http://chronocyprus.com/test

vs

http://chronocyprus.com/test-joomla


 
matt

Posted: 12/13/2013
Quote message 

Any update on the Artisteer export for Joomla 3.2 yet? It is desperately needed.
 
ventsislav

Posted: 12/15/2013
Quote message 

My solution this problem :
Change code in file blog.php - templates\mytemplate\html\com_content\category - with this

<?php
defined('_JEXEC') or die;

require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'functions.php';

if ('artisteer' == JFactory::getApplication()->getTemplate(true)->params->get('blogLayoutType')) {
require 'art_blog.php';
return;
}

Artx::load("Artx_Content");

$view = new ArtxContent($this, $this->params);

echo $view->beginPageContainer('blog');
ob_start();
if ($this->params->get('show_category_title', 1) || strlen($this->params->get('page_subheading'))) {
echo '<h2>';
echo $this->escape($this->params->get('page_subheading'));
if ($this->params->get('show_category_title') && strlen($this->category->title))
echo '<span class="subheading-category">' . $this->category->title . '</span>';
echo '</h2>';
}

if (version_compare(JVERSION, '3.1.0') >= 0) {
if ($this->params->get('show_tags', 1) && !empty($this->category->tags->itemTags)) {
$this->category->tagLayout = new JLayoutFile('joomla.content.tags');
echo $this->category->tagLayout->render($this->category->tags->itemTags);
}
}

if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) {
echo '<div class="category-desc">';
if ($this->params->get('show_description_image') && $this->category->getParams()->get('image'))
echo '<img src="' . $this->category->getParams()->get('image') . '" alt="" />';
if ($this->params->get('show_description') && $this->category->description)
echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category');
echo '</div>';
}
echo artxPost(array('header-text' => $view->pageHeading, 'content' => ob_get_clean()));

?>
<?php $leadingcount=0 ; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="items-leading">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<?php $leadingcount++; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php
$introcount = (count($this->intro_items));
$counter = 0;
?>
<?php if (!empty($this->intro_items)) : ?>

<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php $rowcount = ((int) $key % (int) $this->columns) + 1; ?>
<?php if ($rowcount == 1) : ?>
<?php $row = $counter / $this->columns; ?>
<div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?>">
<?php endif; ?>
<article class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</article>
<?php $counter++; ?>
<?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?>
<span class="row-separator"></span>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php
if (!empty($this->link_items)) {
ob_start();
echo '<div class="items-more">' . $this->loadTemplate('links') . '</div>';
echo artxPost(ob_get_clean());
}
?>
<?php if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
<?php ob_start(); ?>
<div class="cat-children">
<h3><?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?></h3>
<?php echo $this->loadTemplate('children'); ?>
</div>
<?php echo artxPost(ob_get_clean()); ?>
<?php endif; ?>
<?php

if (($this->params->def('show_pagination', 1) == 1 || $this->params->get('show_pagination') == 2)
&& $this->pagination->get('pages.total') > 1)
{
ob_start();
echo '<div class="pagination">';
if ($this->params->def('show_pagination_results', 1))
echo '<p class="counter">' . $this->pagination->getPagesCounter() . '</p>';
echo $this->pagination->getPagesLinks();
echo '</div>';
echo ob_get_clean();
}
echo $view->endPageContainer();

This is working only for Joomla 3.2

For Joomla versions from 2.5 to 3.2
Create a new file with the above code - for example blog_32.php ​​and place it in the folder templates\mytemplate\html\com_content\category
Rename the original file blog.php - for example blog_31.php
Create a new file blog.php with the following code :

<?php
if (version_compare(JVERSION, '3.1.99') <= 0)
require'blog_31.php';
if (version_compare(JVERSION, '3.2.0') >= 0)
require'blog_32.php';
return;
?>

Place this file it in a folder: templates\mytemplate\html\com_content\category

Please, if anyone has found a better solution to share it


 
Ventsislav

Posted: 12/16/2013
Quote message 

I hope Artisteer Team to find solution to this problem and not to create a separate export for Joomla 2.5-3.1
 
Matt

Posted: 12/21/2013
Quote message 

Thank you Ventsislav! The code change in the blog.php did the trick!
 
Conte

Posted: 12/23/2013
Quote message 

Hi, just to be sure that developers have the info, I have the same problem in a Joomla 2.5.17 site using Artisteer 4.2.0.60623
 
Ventsislav

Posted: 12/24/2013
Quote message 

I don't see a problem with Joomla 2.5.17 and Artisteer 4.2.0.60623
There is a problem when the field "leading articles", " Intro Articles", "Columns" and "Links" is blank
It is necessary to fill the 0 /null / or another value >=0
 
DebbyP

Posted: 12/24/2013
Quote message 

ventsislav,
Thank you so much for your fix, took care of my problem.
 
ukphotoguy

Posted: 1/9/2014
Quote message 

This issue seems to have gone on for some time. Come on Artisteer team, how about a solution. I wasted half a day before I realized it was my trusted template company's issue. With more and more sites moving to 3.2 others will have the same issue. The user proposed solution to blog.php is only a partial fix, seems to cause issues with a single item in a blog, but it is better than nothing.
 
Alexandros

Posted: 1/10/2014
Quote message 

Quote :
Tony Arduini


I am afraid I had already tested this and for Joomla 3.2 it's not working.
 
Marc

Posted: 2/7/2014
Quote message 

I have the same problem (Joomla 3.2.1 and Artisteer 4.2): two leading articles instead of one (as configured).

Is there a fix or at least a timeline for a fix? The last reaction from the Artisteer team was back in December(!)


 
Joyce

Posted: 2/27/2014
Quote message 

I recommend you to look this site about How to Create a Blog Using Joomla
and extremely helpful with well explanation. - See more at:
http://www.gowallaby.com/how-to-create-a-blog-using-joomla
 
Linda

Posted: 2/27/2014
Quote message 

Joyce, you miss the point of this entire thread. there is a problem with how Artisteer is exporting the code and it not working with Joomla 3.2. It has nothing to do with not knowing how to build a blog.

ventsislav's solution works...why can't Artisteer fix this and incorporate that fix? Oh yeah that would mean they would need to release a new version and they only do that 2 times a year and never address the bugs that are reported on here.
 
Henri

Posted: 7/14/2014
Quote message 

Still an issue???

Working in Joomla 3.3 and Artisteer 4.2 and it displays two main articles in blogview...

Do we really have to fix the code ourselves, Artisteer?
 
claudia

Posted: 7/15/2014
Quote message 

ventsislav - you saved my day! thanks!
 
Tony

Posted: 9/16/2014
Quote message 

Sucks having to find this and make custom-coding changes immediately after the final release of an updated Artisteer......

:-<

The blog.php replacement worked fine (Joomla 3.3.3 and Artisteer 4.3).
 
Elvira
Artisteer Team

Posted: 9/17/2014
Quote message 

I'm not sure if I understand the issue correctly as the thread started in 2013 and the links showing the issue don't work, however, I assume that you mean the issue that Blog page always shows 2 posts with Artisteer blog layout type, don't you? This is not considered as an issue, but rather as a feature. Let me explain how this feature works.

Default Artisteer theme has 2 posts. Therefore Blog page shows 2 posts:


However, in Artisteer, you can customize the layout of your Blog page. So posts do not necessary have to go one under another, you can create a specific layout, for example:


To create a layout for your Blog page, go to Edit tab >> Layout.

Now, if you log in to your Joomla back-end, go to Templates >> Template Manager >> open your template, you'll see the option to use either Artisteer or Joomla layout for Blog page:


In case if you choose "Artisteer", that means that that layout created in Artisteer will be used on your Blog page. So, let's say, in my second screenshot I set each post to take only 50% of the content area space, so there are 2 posts in one line, and in general, only 4 posts are allowed on Blog page in my project.

If you choose "Joomla", those Artisteer settings won't be used and you'll be able to set your own settings from Joomla back-end.

Hope this makes it clear. Let me know if you have any questions.

Best regards,
Elvira
 
Daniel Gimmer

Posted: 9/30/2014
Quote message 

Thanks for the explanation Elvira, but with Joomla 3.3.4 and the latest version of Artisteer 4.3 I can't find this option in the Joomla Backend anymore. Any ideas?
 
Bernhard

Posted: 10/14/2014
Quote message 

Same to me!
Joomla 3.3.4 and the latest version of Artisteer 4.3
NO "Blog layout type" and no way to change it within joomla.
Any Solution?
 
christoph

Posted: 10/24/2014
Quote message 

Choose "include content" when exporting and import the template, the option should appear in Joomla.
Hope this helps.
 
maljaars

Posted: 12/1/2014
Quote message 

Thanks to Ventsislav !!
Your code works great. Thanks a lot.
Just hope that the artisteer team can fix this bug soon.
 
JACK

Posted: 12/20/2014
Quote message 

Using Art. 4.0.0 and Joomla 3.3.....Blog and Category Layout is empty....seems that the blog.php files is not working with Joomla 3.x....

Any idea what i can change to get a working blog layout ?
 
JACK

Posted: 12/20/2014
Quote message 

No way - included the content from Artisteer in my export, installed it and choose first Joomla Layout and than Artisteer Blog Layout.

Both dont`t work - blank page.

Joomla default templates are working with my blog settings - artisteer template don`t....
 
peergoos

Posted: 2/7/2015
Quote message 

I'm working with the current (newest) version of atisteer, and yes the problem with the blog lay-out is still there.
Before I start hacking into the blog.php file with the script posted above, is there any chance that this will be fixed by Artisteer......it's more than a year now since they said "we'll fix it".

 
gorgeo

Posted: 11/7/2015
Quote message 

Hello!
I still couldn't find a way to fix this problem.
Even the hack with blog.php didn't work.
Please help, thanks
 
Nova Pradana | XMEN

Posted: 4/9/2016
Quote message 

Quote ventsislav:

My solution this problem :
Change code in file blog.php - templates\mytemplate\html\com_content\category - with this

<?php
defined('_JEXEC') or die;

require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'functions.php';

if ('artisteer' == JFactory::getApplication()->getTemplate(true)->params->get('blogLayoutType')) {
require 'art_blog.php';
return;
}

Artx::load("Artx_Content");

$view = new ArtxContent($this, $this->params);

echo $view->beginPageContainer('blog');
ob_start();
if ($this->params->get('show_category_title', 1) || strlen($this->params->get('page_subheading'))) {
echo '<h2>';
echo $this->escape($this->params->get('page_subheading'));
if ($this->params->get('show_category_title') && strlen($this->category->title))
echo '<span class="subheading-category">' . $this->category->title . '</span>';
echo '</h2>';
}

if (version_compare(JVERSION, '3.1.0') >= 0) {
if ($this->params->get('show_tags', 1) && !empty($this->category->tags->itemTags)) {
$this->category->tagLayout = new JLayoutFile('joomla.content.tags');
echo $this->category->tagLayout->render($this->category->tags->itemTags);
}
}

if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) {
echo '<div class="category-desc">';
if ($this->params->get('show_description_image') && $this->category->getParams()->get('image'))
echo '<img src="' . $this->category->getParams()->get('image') . '" alt="" />';
if ($this->params->get('show_description') && $this->category->description)
echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category');
echo '</div>';
}
echo artxPost(array('header-text' => $view->pageHeading, 'content' => ob_get_clean()));

?>
<?php $leadingcount=0 ; ?>
<?php if (!empty($this->lead_items)) : ?>
<div class="items-leading">
<?php foreach ($this->lead_items as &$item) : ?>
<div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</div>
<?php $leadingcount++; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php
$introcount = (count($this->intro_items));
$counter = 0;
?>
<?php if (!empty($this->intro_items)) : ?>

<?php foreach ($this->intro_items as $key => &$item) : ?>
<?php $rowcount = ((int) $key % (int) $this->columns) + 1; ?>
<?php if ($rowcount == 1) : ?>
<?php $row = $counter / $this->columns; ?>
<div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?>">
<?php endif; ?>
<article class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
<?php
$this->item = &$item;
echo $this->loadTemplate('item');
?>
</article>
<?php $counter++; ?>
<?php if (($rowcount == $this->columns) or ($counter == $introcount)) : ?>
<span class="row-separator"></span>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php
if (!empty($this->link_items)) {
ob_start();
echo '<div class="items-more">' . $this->loadTemplate('links') . '</div>';
echo artxPost(ob_get_clean());
}
?>
<?php if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
<?php ob_start(); ?>
<div class="cat-children">
<h3><?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?></h3>
<?php echo $this->loadTemplate('children'); ?>
</div>
<?php echo artxPost(ob_get_clean()); ?>
<?php endif; ?>
<?php

if (($this->params->def('show_pagination', 1) == 1 || $this->params->get('show_pagination') == 2)
&& $this->pagination->get('pages.total') > 1)
{
ob_start();
echo '<div class="pagination">';
if ($this->params->def('show_pagination_results', 1))
echo '<p class="counter">' . $this->pagination->getPagesCounter() . '</p>';
echo $this->pagination->getPagesLinks();
echo '</div>';
echo ob_get_clean();
}
echo $view->endPageContainer();

This is working only for Joomla 3.2

For Joomla versions from 2.5 to 3.2
Create a new file with the above code - for example blog_32.php ​​and place it in the folder templates\mytemplate\html\com_content\category
Rename the original file blog.php - for example blog_31.php
Create a new file blog.php with the following code :

<?php
if (version_compare(JVERSION, '3.1.99') <= 0)
require'blog_31.php';
if (version_compare(JVERSION, '3.2.0') >= 0)
require'blog_32.php';
return;
?>

Place this file it in a folder: templates\mytemplate\html\com_content\category

Please, if anyone has found a better solution to share it