Custum template and easy news

Permalink Browser Info Environment
Hi all,
I am new here and am trying to install easy news.

I created a custum template and uploaded it to the folder root/themes

Everyting is working just fine..I can add block with news list The only problem is that the titel links do not redict me to the news items..is is just a blank page with my custum layout..

Any one suggetions how i can get the neews items shown on my cutom page?

Thanks alot

Type: Discussion
Status: In Progress
matijs
View Replies:
hanicker replied on at Permalink Reply
hanicker
The template is probably missing an Area called "Main". You should have

<?php 
         $a = new Area('Main');
         $a->display($c);
         ?>


inside the page of your theme used to display news.

Hope this helps.

Regards,
Nick
matijs replied on at Permalink Reply
matijs
Hi Nick

Thank for your reply!

Sorry it took so long to thank you...

Had me a little vacation.

Anyway thanks again!
gdamqnov replied on at Permalink Reply
gdamqnov
I am having the same issue and this thread helped a lot! Thanks!

I am just wondering what if I want to show on the news entry details page not only the content but also title and public date?
Right now only the news entry details are shown. How can I do that?
hanicker replied on at Permalink Reply
hanicker
One way to do it is to setup a new page type by copying file default.php of the theme you are using to news.php.

Then open and edit it adding
<?php echo strftime("%d-%m-%Y",strtotime($cobj->getCollectionDatePublic())); ?>

for public date and
echo $cobj->getCollectionName();

for title
in the place you prefer.
Hope this helps, sorry for late reply
emeliot87 replied on at Permalink Reply
emeliot87
I have the same issue. I made new template copy default.php called it new.php and use it as the default page for Easy News plugin. Firstly I had problem with blank page (solution in second post). And now when I want to show title It not showing up. I use code from previous post.
shahbaz replied on at Permalink Reply
shahbaz
Hi good man

i have the same problem as discussed above...

Now where i add the the bit of code you posted..

Waiting for your response

Shahbaz
hanicker replied on at Permalink Reply
hanicker
Hi. You need to setup a new page type called news.php (that is, open your theme folder, copy default.php to news.php and add it through dashboardhttp://www.concrete5.org/documentation/general-topics/page-types)....

Then, edit news.php and add this code:

<?php echo strftime("%d-%m-%Y",strtotime($cobj->getCollectionDatePublic())); ?>

where you want to print the publish date


Regards
Nick
wasabili replied on at Permalink Reply
wasabili
I did that but I get an php error if I add the code into my news.php …
It says that the getcollectiondate is not an object. Can any one help?

Fatal error: Call to a member function getCollectionDatePublic() on a non-object in
wasabili replied on at Permalink Reply
wasabili
I found the solution:
<?php echo $c->getCollectionDatePublic('d. m. Y'); ?>

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.