CGBlog [more] link

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Druuna2008
Forum Members
Forum Members
Posts: 10
Joined: Fri Oct 10, 2008 6:20 pm

CGBlog [more] link

Post 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  :)
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: CGBlog [more] link

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CGBlog [more] link

Post by calguy1000 »

that line will be removed from the help very soon now.
it's invalid.
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.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: CGBlog [more] link

Post 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}
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: CGBlog [more] link

Post 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
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: CGBlog [more] link

Post 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.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: CGBlog [more] link

Post 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.
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: CGBlog [more] link

Post 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
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: CGBlog [more] link

Post 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}
moscato
Forum Members
Forum Members
Posts: 34
Joined: Thu Aug 02, 2007 1:11 pm

Re: CGBlog [more] link

Post 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
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: CGBlog [more] link

Post by Jeff »

You should be able to add them to the lang files and then they should work with $Lang['more_text']
cmaunoury
Forum Members
Forum Members
Posts: 36
Joined: Sun Jul 19, 2009 9:52 pm

Re: CGBlog [more] link

Post 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
Post Reply

Return to “Modules/Add-Ons”