Page 1 of 1

News Summary clickable? [solved]

Posted: Sun Sep 30, 2007 1:16 pm
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}

Re: News Summary clickable?

Posted: Sun Sep 30, 2007 4:41 pm
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?

Re: News Summary clickable?

Posted: Sun Sep 30, 2007 7:10 pm
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

Re: News Summary clickable?

Posted: Sun Sep 30, 2007 9:33 pm
by mental|plate
Alby, you are the man, that worked like a charm!
Thank you mate!

Re: News Summary clickable? [solved]

Posted: Sun Sep 30, 2007 9:40 pm
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.