17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 809 Views |
-
Meta Blog functionality, but LOCAL, is it possible?

23 November 2008 at 8:23am
I need to setup a page that will show me a selection of all blog posts tagged with a certain tag, let's say "mytag"
I could do it with a redirector, but then the URL changes to /blog/tag/mytag
What I need is a Meta Blog functionality that will show blogs tagged on my site, not on Technorati.
Any ideas?
-
Re: Meta Blog functionality, but LOCAL, is it possible?

24 November 2008 at 6:43pm
Well all you need is a function which returns a set of blogs with a given 'tag' so its fairly straight forward. Im pretty sure this will work for you. Its pretty crude. I better way would be to have an exact match search rather then a LIKE.
function ArticlesByTag($tag) {
return DataObject::get("BlogEntry", "Tags LIKE '$tag'");Then in your template you can do <% control ArticlesByTag(SomeTag) %>
-
Re: Meta Blog functionality, but LOCAL, is it possible?

24 November 2008 at 8:06pm
Great stuff willr, I guess it's the first step towards getting dirty with the internals.
I will look up the documentation on how to do that kind of hacking in order to preserve the hack through upgrades.
I appreciate the help, keep up the good work. -
Re: Meta Blog functionality, but LOCAL, is it possible?

24 November 2008 at 8:46pm
This is not a hack at all. If you put this in your mysite/code/Page.php it will not be effected by any upgraded. You can even override the default blog template for your own by creating a folder in themes/ called 'yourtheme_blog' with the same folder / file structure as blog/ (but without code). This keeps all your code modular and free from any upgrade issues
| 809 Views | ||
|
Page:
1
|
Go to Top |


