PDA

View Full Version : Best way to create a headline title links only section?


ButtKnocker
12-31-2009, 01:44 AM
I asked this question at vbulletin.com forum but am getting no response. Can anybody here help me in the right direction?

What would be the best way to create a headlines section on the CMS? What I mean by that is to create a section with nothing but title links on it only as the primary content. No author, no snippet text preview, just straight up headline title links only. A whole page of them, definitely more than 20. Probably more like 50.

I know how to make a section and call it "Headlines" and to pick the layout & grid that I want for it. But there's more to it, most notably the primary content thats getting in my way...I think.

My current approach is to edit the vbcms_content_article_preview template. I know how to edit that template to show title links only. I've tried it and it works perfectly. Does exactly what I want it to. The only problem is that all my other sections use that same template for the primary content and I don't want all my sections to be headlines only.

So I thought the easiest approach would be to create a new template, with the edited code from the original, to show title links only, and name that template vbcms_content_article_preview_headlines

Did that but not sure what to do from there...but I do have some questions regarding that.

How can I manipulate the layout manager to where I can delete primary content? If I'm making a headlines layout I don't want the default primary content. Currently you can delete everything in the layout manager except for the primary content. My goal is to be able to delete primary content and have headlines content in it's place. I understand you can flatten a grid and edit your own html but I'm unsure if thats part of the process I need to do.

That new template I made (vbcms_content_article_preview_headlines), how do I get the system to call on it? Does it have to do with plugins? Should I have created a new plugin (with my headlines code) instead of adding a new template? If so how do I identify the hook location for where the primary content normally goes (because thats where I would be inserting the headline links)?

Also, I believe it's possible to achieve what I'm wanting with customized widgets but am I correct in thinking thats the wrong approach due to the overhead (resources) being too high and the cache system in place?

FYI...here is my vbcms_content_article_preview_headlines template code:
{vb:raw css}

<div class="article_preview">
<div class="title">
<h3 class="article_preview">
<vb:if condition="$showtitle">
<a href="{vb:raw page_url}"><span>{vb:raw title}</span></a>&nbsp;
</vb:if>
<vb:if condition="$can_edit">
<a class="edit" href="{vb:raw page_url}/edit">
<img class="editimage" src="{vb:raw vboptions.bburl}/{vb:stylevar imgdir_cms}/edit_small.png" alt="Edit" />
</a>
</vb:if>
</h3>
</div>

<vb:comment>
<!-- Display Section Location -->
<div class="cms_article_section_location">
{vb:rawphrase section}: <a href="{vb:raw section_url}">{vb:var parenttitle}</a>
</div>
</vb:comment>

<div class="fullwidth article_preview_contents<vb:if condition="$showpreviewonly"> showpreviewonly</vb:if>">
<vb:if condition="$showpreviewonly">
<vb:if condition="$previewvideo">
{vb:raw previewvideo}
<vb:elseif condition="$previewimage" />
<a href="{vb:raw page_url}">
</vb:if>
</vb:if>
</div>

</div>