Joomla 2.5 latest article from a category link - php

I would like to create a menu item with dynamic links to the latest article published in a given category.
I don't want to use the default category blog link because I want the link to leed straight to the article page and avoid duplicate content.
hope this is comprehensible, thx for helping me with this issue.

There are 2 ways to accomplish this, one with code, one without.
The no code method involves replacing the standard Joomla com_content with a CCK extension that has a latest item functionality built in - I know K2 has it for sure, there are likely others.
The other method would require you to create a new model/view/menu item that only pulls the latest published article. This would actually not be terribly difficult since you could basically copy most of the category model and use most of the article view to come up with what you need. The changes are a little too involved to post here however.

Related

Navigating through custom post types in WordPress

I want to redesign my website using WordPress (as CMS) and Bootstrap (as front-end).
Now, I've been pretty successful at doing so, but I have one specific problem.
I have a tutorial website and I want the navigation structure to look like this :
If the user is on my 'website-name/tutorials' then display to him all of the tutorial series titles in an unordered list (so for example C++, XHTML and CSS - but not individual tutorials in each series)...
If the user clicks on some specific serie, then display an ordered list of the elements (so, if he clicks C++, then URL will be 'website-name/tutorials/cplusplus' and he will be able to see all of the tutorial in an ordered list).
If the clicks on one specific tutorial, then the URL goes (for example) 'website-name/tutorials/cplusplus/installing-the-program' and user gets all the content related to the tutorial.
Now, I have been experimenting with this and concluded that the best solution is to create custom post type named "Tutorial" and then make every single tutorial that post type.
However, since on 'website-name/tutorials/cplusplus' I want to display the list of tutorials in "C++" tutorial series and on 'website-name/tutorials' I want to display only the tutorial names, I don't know how to do that.
I tried to do that using Hiearchical posts (so, for example, I made a parent post named "C++" and it's children were all of the tutorials in the C++ serie).
However, I have a problem with that, because my C++ tutorial series has 100 tutorials, but it shows me 101 list elements (I made the website display all the custom post types in an ordered list), with the first one on the list being C++ (the parent post).
So, I'd like to echo the series name only on the 'website-name/tutorials' not on the beginning of the list.
I researched and people seem to use archive in custom post types, rather than parent/child system for this kind of navigation.
I just wanted some of the WP experienced users here to tell me, which is the better solution for my problem? Dealing with these parent/child problems or switching from parent/child posts to archive posts?
If I understand fully perhaps using standard posts and categories will do the trick? Your '/tutorials/' page can display the full list of all posts and when a user clicks on a specific category (e.g. C++) only the relevant posts will display.
You can use the following code to list posts of a specific category:
<?php query_posts( 'cat=20' ); ?>
Changing "20" with the chosen category ID.
Hope this helps!

How to link article on different languages

I need to make a connection between articles on different languages in Joomla, like in the menu manager. Can anybody tell me how to implement it and if it's possible without using additional plug-ins?
Update:
I already have a multilingual, but only for categories and I need configure it for articles.
There is an example below:
http://clip2net.com/s/6SElBt
Article for "Solar Energy" category and when I change the language I move to the description of this category in another language, but not in the same article.
http://clip2net.com/s/6SEkD1
How do I configure the language switching and stay on the same article?
Joomla 2.5 and later have core support for multilingual content. But there are some extra steps involved, in order to set it up properly.
There are plenty of tutorials out there: http://multilingual-joomla-demo.cloudaccess.net/multi-lingual-steps-by-steps.html
Briefly the process involves the following steps:
Enable and configure the core language plugins
Install the additional translation packs
Add the corresponding content languages
Prepare your categories structure to reflect your multilingual content. - Note that you will have a root category for all languages and then a root category for each language.
Set the main language for your homepage
Create the corresponding Menu Structure for all your languages
Start writing content for each language
Configure and Publish the Language Switcher module.
I think what you are looking for is menu items/article associations.
If the article you want to connect to another is linked to your site through a menu item, go to the menu item in question and see the association tab. There you can select what other menu item you want to connect it to.
You can also associate articles with each other by doing the same thing. Go to article manager->the article in question->association tab and choose what article you would like to link it to.
With Joomla 2.5 you can associate menu items, but not individual articles. So the best you can do is if a menu item links to a specic article, then you link the articles at the menu level.
Joomla 3 has more options, and you can indeed associate individual articles in different languages (at the article level) ... it works like a charm.
Good luck!
I've been trying to find a solution for the same issue on Joomla 2.5 but couldn't.
Today I found this link that describes how the solve the issue on Joomla 3.0:
http://www.slideshare.net/erictiggeler/creating-a-multilingual-site-in-joomla-joomla-3-beginners-guide-eric-tiggeler
I didn't try it yet but it looks like the feature is supported in Joomla 3.0.

Simple CakePHP Portfolio

I am building a very simple website ( http://driz.co.uk/beta/ ) using CakePHP to show a portfolio of my work as well a few pages such as about me and contact. I was thinking of just creating each item for my portfolio as a page inside the /views/pages/ folder but seen as I'm wanting to learn a bit about CakePHP I thought it would be probably better to use a database and store each item in a simple table.
What I need to do is have a simple page like /portfolio/ which lists all my work to date and then links to each item I have so for example /portfolio/my-awesome-work/
I also need to list the items in the sidebar as shown in the link.
For each portfolio item I will need a title, a body (which will store the content and images for each item) and also the client information. I don't need any image upload capabilities as I will be just adding the HTML for it in the database table.
If anyone can help it'd be much appreciated.
Thanks
Hopefully you aren't asking for a full solution (frowned upon on SO)
First follow the blog tutorial : http://book.cakephp.org/view/1528/Blog
This is a great place to start as it walks you through all the basics.
As for your particular problem. Creating a portfolios table with all the fields you mentioned and baking the code (you'll know what that means when you follow the tutorial) as a starting point will get you half way there.
You could also add in an admin area to manage your system. This would mean you'd need to create a users table and add the Auth component

Beginner question on Drupal

I am new to PHP and am doing some research on Drupal system to set up a website for my church.
Just want to know how to development a module on a page that display a list of articles? eg. display the article by category or tag etc.
Is there any template I can use or I will need to develop the template myself?
Thanks in advance!
Chris
Check out the views module. It lets you define your own rules for viewing articles (or other content types), by tag, category, or any arbitrary conditions you can think of.
in complement to #DanSingerman good answer For category and tags you should have a look at Taxonomy and also SimpleView to get some less advanced user interface when building your views.
If you're only displaying articles, you should go with Wordpress. Most Drupalistas would probably recommend Wordpress over Drupal for this usage.

How do you create a "linked list" of Story nodes in Drupal 6?

I'm trying to link together a number of pages in a regular flow in Drupal. The way I've been doing it recently, is to create a new Menu and then seperately create a page for each menu item.
For example, I have a menu block with links One through to Six. I then create six pages and link One to node/1, Two to node/2, Three to node/3 and so on.
This is fine, but I'm told that I can create a number of story nodes instead, and they'll link together at the bottom of the page like so (http://imgur.com/xCtYe) without my intervention, almost like a linked list of page nodes.
How would I achieve this?
I worked it out. I had to enable the book module. Co-worker just explained to me after reading the question :)
You might also check out NodeQueue
I see you already solved it, but just FYI, you can also use the Custom Pagers module to do this as an alternative to the book module. Here is an excerpt from its project page:
... allows administrators to define context-sensitive previous/next pagers for any node type. The list of nodes to be cycled through is generated by a user-selectable view, and each pager can be displayed above or below the node body or in a sidebar block. This makes it possible to duplicate the paging functions of forum.module and book.module, as well as more complex stuff like comic strip navigation.

Categories