Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Change frontpage articles according...
Change frontpage articles according to template
Change frontpage articles according to template
I think the description subject says it all. I would like to change the front page articles according to the template in use.
Can it be handled with JomGenius commands? I am looking for a way to start to use JomGenius as well... I have no clue yet on how to integrate it to my needs even I went through the documentation, I can't relate my use to it yet.
I use my website to sell guitar lesson service online and in private course, to different kind of people obviously, that's why I am currently customizing my site with many new template environment according to the user's profile and ads source.
Thanks,
Alex
Re: Change frontpage articles according to template
Hi Alex,
As far as I can see, there's no way to change which articles are picked up by the "frontpage" view of the com_content component. There's certainly no official way to do it, and I am pretty sure that the frontpage view just queries the database directly for the most recent articles that have been tagged as "frontpage". This makes the behaviour very hard to override.
Stepping back for a moment, what are you trying to achieve? Are you basically just wanting to be able to hand-pick a set of articles for different situations? Will these selections of articles change very much/often?
I wonder if you could try one of these approaches:
1 - for each of the different scenarios, create a content category. Create a category "blog" menu item in the main menu to show the articles from that category. Shuffle or add items to this category to shuffle the items on that page. Use MetaTemplate to change the "default" menu item to this one, and deactivate all the other category blog menus, depending on whatever criteria you are using for the different groups of customers.
In this way, the front page always looks like a front page (the category blog view is practically identical to the frontpage view), and you get full and easy control over which articles appear in each view, just by changing which articles are in which category.
2 - alternatively, you may be able to use a module like "Mini Frontpage":
http://www.templateplazza.com/view-deta … a-1.5.html
http://extensions.joomla.org/extensions … -news/2751
This is a module that you would add to your normal front page. You normal front page might just be a very short article, but with the addition of this module above or below the article you would get a frontpage-like display. As far as I can see, this module would allow you to specify a category that the articles should come from.
Therefore you could set up several "Mini Frontpage" modules, one for each scenario. Each may point to a different category, rather like I suggested above.
Then you could use MetaMod to switch which module got loaded on the front page, depending on those scenarios you were talking about.
What neither of these options allow you to do easily is to share the same article between 2 different versions of the front page - because they rely on using a different category per version of the front page. But I suppose you could duplicate any articles you needed to share between 2 different categories.
Anyway, those are just off the top of my head, so I hope they help!
Cheers,
Stephen
Re: Change frontpage articles according to template
Yes it helps Stephen, I am gonna create a separate category blog linked to a menu for the article I want to show up on the frontpage according to the template in use. I will duplicate articles if needed. Thanks
Re: Change frontpage articles according to template
I understand the concern about quality SEO.
I've had some ideas about work-arounds. These are not perfect but might give you some ideas.
(1) Depending on how frequently the articles change, you could use MetaTemplate rules to detect when those frontpage articles have been clicked on, and redirect them through to the "official" URLs.
- Person clicks on a frontpage article in "scenario1" category
- URL is /scenario1/article1.html
- MetaTemplate picks up that article is in "scenario1" category (rule filters on that category)
- MetaTemplate SUCCEED action does a redirect to the official article. This would be done in the PHP section of the SUCCEED action, because the redirection needs to be dynamic. I can give you some PHP for that - I've done similar things before.
(alternatively, if there is a small number of articles then you could detect each article individually rather than detecting the category, and redirect to the exact URL for the exact article - so 1 MT rule per article).
(2) You mainly need to find a way of presenting a frontpage-like layout of articles, in several versions. Wouldn't it be great if there was a component that would allow you to simply tag articles with arbitrary tags, then when you create the menu item for that component, you would specify which tags (or meta keywords, just to make it easy) it was going to search for? Then it would only display articles that had that particular tag or set of tags. Or a particular author. Or some other arbitrary factors.
I don't know of such a component... but someone should write one!
Hope something in there might help...
Cheers,
Stephen
Re: Change frontpage articles according to template
OK I follow you on that last suggestion. It is more laborious but it would definitely be a good alternative for duplicated articles.
I got another one... I thought of something; what about just not using any frontpage article at all? I mean, just designing the frontpage only with modules using metamodpro, would it be bad for SEO quality to do that? Do module contains meta information that are as good as articles meta information for search engines?
I happen to think maybe it could be better. How about you?
Cheers,
Alex
Re: Change frontpage articles according to template
OK I will test that dynamic redirection and see how it behave with my site. Could you please give me example of the coding?
Thanks.
metamodguy wrote:
- Person clicks on a frontpage article in "scenario1" category
- URL is /scenario1/article1.html
- MetaTemplate picks up that article is in "scenario1" category (rule filters on that category)
- MetaTemplate SUCCEED action does a redirect to the official article. This would be done in the PHP section of the SUCCEED action, because the redirection needs to be dynamic. I can give you some PHP for that - I've done similar things before.
(alternatively, if there is a small number of articles then you could detect each article individually rather than detecting the category, and redirect to the exact URL for the exact article - so 1 MT rule per article).
Re: Change frontpage articles according to template
If you could just answer this post too as I am gonna experiment with the mini-frontpage in the meanwhile. Thanks
atherrien wrote:
I got another one... I thought of something; what about just not using any frontpage article at all? I mean, just designing the frontpage only with modules using metamodpro, would it be bad for SEO quality to do that? Do module contains meta information that are as good as articles meta information for search engines?
Re: Change frontpage articles according to template
Regarding the last post:
Yes, it's fine for SEO to create the whole front page with just modules. Modules in themselves don't add any metadescription or metakeywords to the page.
In this situation I generally make a short article that I use as the 1st paragraph of the page. This allows me to add keywords and metadescription. If for any reason that doesn't work then I use "TagMeta" (see the JED) to add keywords and description for the front page and any other pages.
Cheers,
Stephen
Re: Change frontpage articles according to template
Dynamic redirection:
Let's say you want to pick up certain articles, and redirect to certain other articles.
1 - in MetaTemplate Pro, enter the id numbers of the articles that you want to detect into the article ID box. Thus when any one of these is detected, the rule will succeed.
2 - in the SUCCEED action, do the following:
// change this to the menu item id (Itemid) of the menu item
// that the target (destination) article should appear in:
$target_Itemid = 999; // <-- change here!
// You are going to redirect anyone requesting article 100 to article 200 instead, etc.
// Customise as appropriate:
$redirections = array(
100 => 200,
101 => 201,
102 => 202
);
if (array_key_exists($id, $redirections) ) {
$app = &JFactory::getApplication();
$app->redirect( str_replace( '&', '&', JRoute::_( "index.php?Itemid=$target_Itemid&option=com_content&view=article&id=" . $redirections[ $id] ) ) );
}
I just tested this and it worked for me...
Hope it does for you too.
Cheers,
Stephen
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Change frontpage articles according...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7655
- Newest User:
- martha48
- Members Online:
- 0
- Guests Online:
- 138
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked