By Matti303 on
How can I display a couple of teasers on another page than the front page? I would like to select specific teasers to show up on other "overview" pages.
I tried views but I guess it is overkill to use it just for that...
How can I display a couple of teasers on another page than the front page? I would like to select specific teasers to show up on other "overview" pages.
I tried views but I guess it is overkill to use it just for that...
Comments
Actually that's exactly the
Actually that's exactly the type of thing views is for-- unless you want to write the sql yourself.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
ditto. views solves this with zero code.
you create a view and a corresponding block and voila, it's there for you to put up on other pages.
if you're spooked out by views, try using the simpleviews module with it - it will make a super simple view by content type, including a block and you can use them and then use views to modify it
personally, i think simpleviews should be rolled into views as a part of it, but that's just me...it makes it soooo much less intimidating
........................................................................
i love to waste time: http://twitter.com/passingnotes
simpleviews - views tutorial
Thanks for the tip Zilla, I installed simpleviews and maybe I'll use it one day. Unfortunately it cannot display specific posts so I guess I will have to learn to work with views.
Too bad all the tutotials in the views documentation are for drupal 5 and not 6. I already saw the views tutorial from learnbythedrop.com but I guess I need some more training.
Back to search.
1. Use nodequeue and
1. Use nodequeue and manually add the required nodes to a new queue. Again, probably an overly complex solution... unless you want to be able to manually control the order the nodes appear in.
- OR -
2. Create a taxonomy vocabulary "overview" with 1 term "overview", not "required", apply vocab to the relevant content type, then tag the relevant nodes with this term, the URL taxonomy/term/1 (which you can always alias) or whatever will do what you want. Drupal core is surprisingly good you know ;)
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Interesting way to look at
Interesting way to look at it, option 2, thanks gpk!
I actually got some very fast results with this method.
Now I do get an "in overview" link between my title and text on the pages that are tagged. I tried to hide it but could not find a setting for it. As a work around I'll give the "overview" word a more useful meaning for the visitor. (however it is a bit oddly styled)
PS an alias is even created automatically "mydomain.com/category/overview/overview" !
>Now I do get an "in
>Now I do get an "in overview" link between
You would need to make a custom node template for this node type and remove the bit of the template that prints out $terms, along with the HTML that is wrapped round that.
The benefit of this approach to generating the overview list is that you can add a new page to the overview without having to change e.g. the Views arguments, plus the URL of the page that generates the listing won't change. Depending on your use case, that might not be of much value though!
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
gpk, I agree a 100%, if I
gpk, I agree a 100%, if I create a new page with my current views-setup, I have to add the additional argument to the overview page if I want to include the teaser. I will look into customizing my theme soon, thanks for pointing out the $terms variable.
About the URL of the overview page, with my current setup, it does not change as I am creating a new display for every overview page. In that display I will override the arguments settings and set the appropriate node id's as a "default argument" so even when you go to mydomain.com/overview2 instead of mydomain.com/overview2/2+3+4, you will see only the teasers for overview2. The default arguments also works for blocks.
Meanwhile my site is online ;-) www.reanimatepc.com
Finally success with VIEWS
I finally get the teasers I want on my overview pages.
So for anyone that starts with views:
1. Take your time. Sit back and watch the tutorial from learnbythedrop.com (http://drupal.org/node/248766) carefully.
2. Make sure you have the "advanced help" module installed
3. In the views administration panel , there is a link "Not sure what to do? Try the "Getting started" page." , read all this stuff !!
Now I wanted specific pages only on my overview pages. I got stuck because I tried to accomplish this with filters. Instead you simply have to add an ARGUMENT like Node ID. You can allow multiple arguments. So to display node 3 and node 4, just enter 3+4 as the argument. The url alias would then be yourdomain.com/yourviewspagepath/3+4. You can use anything as an argument, like node title or node created date.
Another tip to understand views is to look at the MySQL query that is created. If you change something in the views admin panel, check what it changes in the query.
Thanks for all the help!
also check out teaser block!
if you are only looking at a couple of specific teasers that you want to manipulate, then check out 'teaser block ' - it is WAY easy to handle for small content needs
........................................................................
i love to waste time: http://twitter.com/passingnotes
only development snapshot
thanks but there is only a development snapshot available for Drupal 6, I rather don't take that risk
it's working fine for me (knock on wood)
been using it for a little while with no problems, only gripe is lack of a clear space before 'read more' link (it flushes to last character in text block within the block
........................................................................
i love to waste time: http://twitter.com/passingnotes