News Summary clickable? [solved]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
mental|plate
Forum Members
Forum Members
Posts: 11
Joined: Mon Sep 17, 2007 8:23 pm

News Summary clickable? [solved]

Post by mental|plate »

Hey guys,

My first post here, i have been a lurker for the past few weeks trying to learn more about this simple but powerful CMS, and probably the best CMS out there. Before using CMSMS, i've tried Wordpress and textpattern, and yet none of them suited my need. I wanted to build my self a simple online portfolio, that can eventually grow, to perhaps become my blog or i dont know what.

I found that CMSMS is simple to learn because when I "started" i didnt know anything about html or css, and i didnt want anything to do with php or any other "hard" language because that is not what i do. I learned enough css and html to be able to make me a simple web site. And to stop explaining me self here i'll post me question.

So i want to use news to make my portfolio page easy to manage. Not to go in the whole explaining things here is my WiP site:
http://kemal.itbox.ba/. Go to portfolio and you'll understand next bits :d.
You see two item, that in fact are the news with smaller pictures in summary and bigger in detail... now the only way to get to the detail content is naturally by clicking on the title of the "news", but i want to users be able to click on the image and get linked to detail content...I know i can hyperlink the image but i was wondering can i make adjustments in the summary template so i get this every time I post a new "item".

Here is my summary template, and like i sad i only know bit and pieces of html and css so although this makes some sense to me i cant fully understand it. So can i add something where it says "{eval var=$entry->summary}" so that summary content becomes linked in the same way as his title?
Oh, and i have seen and tried cataloger module, and it is good but it isnt what i need and it doesnt give me the freedom i want.
{foreach from=$items item=entry}



{$entry->titlelink}


{if $entry->summary}

{eval var=$entry->summary}


{else if $entry->content}


{eval var=$entry->content}

{/if}
{if $entry->formatpostdate}

{$entry->formatpostdate}

{/if}



{/foreach}


{if $pagecount > 1}
 
{if $pagenumber > 1}
{$firstpage} {$prevpage} 
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber
{/if}
Last edited by mental|plate on Sun Sep 30, 2007 9:34 pm, edited 1 time in total.
mngujara

Re: News Summary clickable?

Post by mngujara »

I do not think you can make the summary text linkable since there is no ... code in the Summary template. I may be wrong - someone with more experience probably knows better.

Perhaps you might need to edit the actual News module php file?
alby

Re: News Summary clickable?

Post by alby »

mental|plate wrote: Here is my summary template, and like i sad i only know bit and pieces of html and css so although this makes some sense to me i cant fully understand it. So can i add something where it says "{eval var=$entry->summary}" so that summary content becomes linked in the same way as his title?
{foreach from=$items item=entry}



{$entry->titlelink}


{if $entry->summary}

link}">{eval var=$entry->summary}

...................
Try with this modification (UNTESTED)

Alby
mental|plate
Forum Members
Forum Members
Posts: 11
Joined: Mon Sep 17, 2007 8:23 pm

Re: News Summary clickable?

Post by mental|plate »

Alby, you are the man, that worked like a charm!
Thank you mate!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: News Summary clickable? [solved]

Post by calguy1000 »

As a lesson.... to debug issues like this, use {$entry|print_r} inside of the foreach loop (the variable name may change depending upon the module).  If used correctly, it will tell you all of the variables that are defined within each object, and I'm certain you will find alot more flexibility inside the core, and addon modules of  CMS Made Simple. 

Maybe I should make a wink video out of this.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”