Two Articles reached over same menu - joomla

I am new to Joomla and I think there must be an easy way for doing this.
I have my content-area and i want to put two articles there like in this pic:
The Articles should be reached over the same menu entry.
By now I have a simple <jdoc:include type="component" /> for inserting main Content, but the Second "Box" should be filled with another Article.
Is this possible via Categorys ore something else?

The fastest and nastiest way to do it:
Just make one article, make some simple html code with divs or a table and paste it in the article editor (of course toggle html view first and if you have problems with code-cleanup, just deactivate the editor)
Problem Solved, you have one menu entry ;)
Otherwise you can do it with the category blog view: leading = 0, intro = 2, columns = 1, links = 0
After that you have to style both css classes .item.column-1 and .item.column-2 to make your "article seperations"

Related

Adding Joomla Article Order number inside an article

I am trying to create a Joomla site that would be showing the article order numbers (not Article ID) inside each article. that way I can handle it like a book.
Each page will show the article order number at the corner - like a page.
That way I will be able to have the site modeled by categories and pages will show with their page number (Article Order number) at the corner.
I want to give the user the ability to watch the pages like they are reading books by categories.
I would be happy to know - how can I add the article order number (for each category) inside the article itself.
I am sure that there is a PHP code that can do that.
Thanks so much for your help and assist.
Arye
You'll need to override the default article layout in your template.
If your template doesn't already have an article layout, you can copy the default layout from components/com_content/views/article/tmpl/default.php inside your template override templates\[YOURTEMPLATE]\html\com_content\article\default.php (replacing [YOURTEMPLATE] by your actual template name.
You can then display ordering where you require it within your template by using
<?php echo $this->item->ordering; ?>
You'll most likely want to either check for a certain condition (the article's category, perhaps) to determine whether you want to display the ordering.
Another option is to create an alternative layout instead of overriding the default one. You can rename default.php in your template to, let's say bookpage.php. You will then be able to pick the new layout as an alternative layout in your articles' options.
you can get article id by using
Request::getVar('id');
for more you can check the link
Joomla plugin : how to get article title and article id
for jquery you can do like this. you can create a function and call on every page load it will sort all your content accordingly. you can assign other attributes also in foreach loop.
<div id="allArticles">
<article id="3">Article 3</article>
<article id="1">Article 1</article>
<article id="2">Article 2</article>
</div>
$("#allArticles article").sort(function (a, b) {
return parseInt(a.id) > parseInt(b.id);
}).each(function(){
var elem = $(this);
elem.remove();
$(elem).appendTo("#allArticles");
});
more you can see the working example here http://jsfiddle.net/THMu3/

How do configure front page static articles for Joomla 2.5

I'm still pretty new to Joomla and I'm familar with adding custom HTML modules in various positions. I'm also familar with setting up the blog layout for the front page with leading articles, intro articles, etc. However I have a case where I would like to have a image slideshow with a static lead article under that, with 3 intro articles (one in each column), with all new articles listed below this hortizontally instead of being added to the top of the list. Is this possible and if so how can it be done?
see The R.I.P. Files
Thank you
Jim
For the slide show +static article I would either put it in a module in a position or put it inside a lead article. In terms of keeping your one article at the top one trick is to give it an order of -1. Another would be to manually maintain the order you want and use order by order.

Joomla: Override Category Blog output multiple times?

Yes. I want to override output of Category Blog component to 2 different display styles.
For first style, i copied and edited blog_item.php & blog.php in [mytemplate]/html folder. Then i choose template style from dropdown in backend of my category blog. That's worked. The display of category blog change as i expected.
But if i want to create another style and use in another category blog. How could i do ? And how to i named my files ( I tried blog_1.php, blog_item_1.php ) but only see my first style display in backend.
I'm using joomla 2.5.
Please help me. Thank you very much !
=================================================================================
[UPDATED]
I solved this issue. Here my solution:
Clone my template to [my_template_2]
Go to [my_template_2]/html/com_content/category then edit blog.php, blog_item.php as my needs.
Go to backend, at my category blog menuitem, i assigned [my_template_2] as its template style.
Then it worked. Both my category blog have its own style.
This maybe not very good solution because i have to use multiple templates, but at this time it's quite enough for me.
Thank you, stackoverflowers.
=================================================================================
[UPDATED 2]
Now, with multiple template styles, I could create unlimited styles for my category blog component within just only one template. That's very much better.
As you may know, joomla doesn't let developers make different styles for its components.
I think you have to list all menus which are made by "category blog component" in template managing page and let users set each menu style at there.**
and at blog.php, check template setting and then load customized style...
** you have to develop a custom field element which list all "category blog component" menus.
* you can use this code to accessing template parameters in component's template :
$app =& JFactory::getApplication();
$template = $app->getTemplate(true);
$paramsTemplate = $template->params;
$style = $paramsTemplate->get('style');
You don't need to use multiple styles. What you need is to use alternate layouts and alternative menu layouts.
For alternative menu layouts in the html/componentname/category folder of your template make a new style with a unique set of names similar to the way blog already provides an alternative to category list in the article category layout folder. Also make a new xml file for each layout that you make, with a matching name.
When you create your menu item you will now get these alternatives along with your other normal choices. Just select the one you want.
Based on the learnings above here is my code for the /templates/mytheme/com_content/category/blog.php
And then in the Global Configuration > Article Manager Options > Category choose Blog as the override/ layout.
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
$pageclass_sfx = trim($this->pageclass_sfx);
// so pick it on the page class in menu item
if (isset($pageclass_sfx) && $pageclass_sfx != '') {
echo $this->loadTemplate($pageclass_sfx);
} else {
echo $this->loadTemplate('default');
}
I can add multiple elseif if something else is needed, or it will look for 'blog_' . $this->pageclass_sfx . 'php'. It is always beginning blog_ as thats coded into the com_content. The old blog i moved to blog_default.php and blog_default_item.php

Pinpointing the difference and changes made between two pages in magento 1.6.2

I have two pages that should be using the exact same template and layout.
The correct item layout can be seen below.
http://dokha.co/index.php/medwakh/custom-medwakh-from-white-horse-studios-13.html
The incorrect item layout is below.
http://dokha.co/index.php/shisha-tobacco/al-fakher-shisha-tobacco-1.html
As you can see in the first image the layout of the item is compact. In the second link it is all drawn out.
I am curious to know if you can tell me how to make the second one like the first one, The compact style. I am not sure what modifications could have been made in magento to cause the layout to only show up that way for specific items, as only the items in the category on link 1 behave that way, I would like to know how to make them all behave this way.
Ok, first thing: the layouts are slightly different because in the first example, you have simple product and in the second example you have a configurable product.
So, view.phtml is including different templates in each.
Regardless though, the actually culprit of the expanded space you are seeing in the second example is being caused by a clearing div. Simply remove it.
The div you are looking for is this:
<div class="clearer"></div>
and you will find it in app/design/frontend/your_package/your_theme/template/catalog/product/view.phtml

Joomla 1.5 / Modification of YooTheme "ZOO" Component

I'll start out by mentioning that there is a developer forum for Zoo and I have used it already. My purpose posting here is that I typically get a thorough answer within minutes or hours at SO, whereas the responses on dev forums can be slow or non-existent due to the smaller population base.
My question regards Yootheme's ZOO 2.3.2. By default, a product "Frontpage" appears to have a "Categories" box rendered on top of the items. If one turns off all the available options in Frontpage/Template configuration (hide Titles, Count, Descriptions, etc.), an empty box still remains on top of the items.
I've been able to manually remove the box in its entirety by addressing the following file:
media/zoo/applications/product/templates/default/frontpage.php, and commenting out lines 84-92:
<!-- <?php
// render categories
if ($this->category->childrenHaveItems()) {
$categoriestitle = $this->application->getParams()->get('content.categories_title');
echo $this->partial('categories', compact('categoriestitle'));
}
?> -->
Seems like there should be a more eloquent way of doing this on the admin backend, but I couldn't find one. Am I missing something or is my solution the best one?
ZOO is designed to easily be able to modify the built in templates to suit your needs. ZOO templates are meant to be overridden much like Joomla uses template overrides. Rather than editing the default template, you simply create a new template that does what you want it to. The default template should not be changed.
Here is the documentation on ZOO templates - http://www.yootheme.com/docs/home/item/create-a-new-template
Rather than edit the file you mention above, you make a new template here -
media/zoo/applications/product/templates/YOUR-TEMPLATE-NAME/frontpage.php
Then do all the changing you want without messing up the default.
There is an easier way: First, you must identify what calls the item called "frontpage". In PURE yootheme at least it is called from "home" in the "mainmenu". So click "home" buton of the mainmenu, then over the right menu "Parameters(Basic)" you just chose "-select aplication-" instead "frontpage" and that's it.The Frontpage and its "box" are now gone. At least it works for me.

Resources