Page 1 of 1
CGBlog [more] link
Posted: Tue Jun 02, 2009 7:09 pm
by Druuna2008
Hi,
I have been looking how to add a [more] link to CGBlog. I don't want just the title to link to the full content, but also at the end of the summary. Can anybody help?
Thanks in advance

Re: CGBlog [more] link
Posted: Tue Jun 02, 2009 7:42 pm
by jmcgin51
from the CGBlogs Help
(optional) moretext="more..." - Text to display at the end of a cgblog item if it goes over the summary length. Defaults to "more..."
So it looks like this is already functional. Are you just looking for the tag to use?
I would guess it's something like {eval var=$entry->more} or {eval var=$entry->moretext}? Just a guess.
Re: CGBlog [more] link
Posted: Tue Jun 02, 2009 11:05 pm
by calguy1000
that line will be removed from the help very soon now.
it's invalid.
Re: CGBlog [more] link
Posted: Wed Jun 03, 2009 7:03 am
by Jeff
Go in the summary template find the line that make the title a link:
Code: Select all
<a href="{$entry->detail_url}" title="{$entry->title|escape:htmlall}">{$entry->title|escape}</a>
then change it to what ever you want it to say, like--
Code: Select all
<a href="{$entry->detail_url}" title="More....">More...</a>
And then put it back in the template at the end of the summary. Like right after this section:
Code: Select all
{if $entry->summary}
<div class="CGBlogSummarySummary">
{eval var=$entry->summary}
</div>
{else if $entry->content}
<div class="CGBlogSummaryContent">
{eval var=$entry->content}
</div>
{/if}
Re: CGBlog [more] link
Posted: Mon Jun 08, 2009 4:42 pm
by moscato
hi,
i set the moretext parameter in my page which calls the cgblog module. like:
{CGBlog summarytemplate="summary" detailtemplate="detail" moretext="read more..." number="3"}
the problem is: how do i call the moretext in my blog-template? $moretext for example is not working
the thing is, that i use different languages for my blog and i would need "read more..." for english posts and "weiterlesen" for german posts.
hope, anyone could help me
thx,
tom
Re: CGBlog [more] link
Posted: Mon Jun 08, 2009 7:25 pm
by Jeff
Read the post! Calguy already stated that the parameter doesn't work and will be removed. And I posted the instructions for how to add it.
Re: CGBlog [more] link
Posted: Mon Jun 08, 2009 8:25 pm
by jmcgin51
@moscato
it sounds like you might need different templates for your German and English posts, so that the correct "more" text is provided per ajprog's instructions.
Re: CGBlog [more] link
Posted: Tue Jun 09, 2009 1:29 pm
by moscato
@ajprog: thx

i DID read the post, but i thought there's maybe another name for the paramater and calguy could tell us. i've already used your suggestion before (by default), but that's unfortunately not the way my problem could be solved. i think it's clear that i would like to avoid using different templates for each language.
@jmcgin51: yes - i think that's obviously the only solution at the moment. will do that

thx for that tip!
best regards,
tom
Re: CGBlog [more] link
Posted: Tue Jun 09, 2009 10:22 pm
by jmcgin51
there's probably some way you can get the post language, and incorporate it into a conditional statement, so you could still use just the one template. I don't know the details, but it would look something like this:
{IF $post_lang == "GE"}
use the German moretext
{ELSE}
use the English moretext
{/IF}
Re: CGBlog [more] link
Posted: Wed Jun 10, 2009 7:22 am
by moscato
thx for your hint!
the problem is, that there is no posibility to write a blog-post in different languages. you've to create categories for each language like: Cars-DE, Cars-EN, etc.
therefore there is no $post_lang available
do you know if i can "crop" the category-string "Cars-DE", "Electronics-DE" so that i only get "DE" or "EN" and then performing the conditional comment?
thx for your help,
tom
Re: CGBlog [more] link
Posted: Thu Jun 11, 2009 10:08 am
by Jeff
You should be able to add them to the lang files and then they should work with $Lang['more_text']
Re: CGBlog [more] link
Posted: Thu Jul 23, 2009 8:57 pm
by cmaunoury
Sorry, just a little parenthesis to follow up on this subject.
If I have a post that has both summary and detail, but I want only the summary to display on my homepage and the content in my blog page, I should change the summary template and kick out "detail" in it and then put in my content page:
{CGBlog summarytemplate="summary"}
and then have my detail template without summary and put in content:
{CGBlog detailtemplate="detail"}
Is that right or am I missing a step in the logic of CG Blog? What I want to do is have a basic two lines summary that reads on the homepage in a content block, with a "read more" link that goes to the entry. In my "blog" menu, I would like to have the details with comment activated that can be read on the page as they are posted.
Any way I can get a kind of over-newbie tutorial on this?
Best,
Colin