Meta data in blog entry
Permalink 1 user found helpful
I've just started trying Concrete5, using version 5.7, and I'm really amazed. As an average end user, I've never seen such an elegant CMS. It is a delight to use, really.
Now, one thing I miss is a kind of topic link in the meta header of the blog entry. Just under the page title there is the creation date and the user name. I would like to see there a link to the blog entry topic under which the blog post was posted.
I tried editing the file ../concrete/blocks/page_title/templates/byline.php, adding something like...
but it doesn't work.
Does anyone know if that could be implemented by editing that file, and how?
Now, one thing I miss is a kind of topic link in the meta header of the blog entry. Just under the page title there is the creation date and the user name. I would like to see there a link to the blog entry topic under which the blog post was posted.
I tried editing the file ../concrete/blocks/page_title/templates/byline.php, adding something like...
but it doesn't work.
Does anyone know if that could be implemented by editing that file, and how?
Here's how I would approach the problem.
1. First, turn off the overrides cache in Dashboard > System and Settings > Optimization > Cache and Speed Settings.
2. Next, create a new directory at application/blocks/page_title/templates/. Copy concrete/blocks/page_title/templates/byline.php into this directory. Since you turned off the overrides cache, the system will look into the application directory before looking into the concrete directory, and you'll be able to keep your custom changes separate from concrete5's internal code.
3. Now, you can make changes to byline.php for this new functionality. Here's a custom template that should get you started:
It's basically the same as the byline template, but in order to show topics it grabs the custom attributes of the current page, and loops through them. A couple notes:
1. This assumes that you're using blog_entry_topics. This is a separate attribute from project_topics, etc... so this is doing some hard coding. You might consider making separate custom templates for the different areas of your site.
2. This assumes you always want to link up to the parent page.
3. This doesn't give you any CSS for the page-topics class applied to the span. You'll have to do that yourself.
Hope this helps!