Full Page link

Hello

Like in the blog, i want to create a link “Reade more” to get the full page from an excerpt. My problem is to create link: cb.linkPage(cb.getCurrentPage()) makes no sense, it points to itself.

Any idea, how to reach the full page?

Thanks!

Cheers

There is a setting in the Dashboard settings to do that.

Hi Andy

I don’t understand you answer, Of course, Allow Page Excerpts is switched on.

Maybe i try to clearify my question: Like in the blog section, an excerpt, if available, will be rendered. To read the complete page, the link “read more” must be clicked. My problem is to create the right link to get the full page.

Thanks

<cfif entry.hasExcerpt() and cb.isIndexView()>
#entry.renderExcerpt()#

Read More...
#entry.renderContent()#

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Like I said in an earlier post Martin, you really should be looking at the current themes / layouts to see how things are done.

… and to get you started, here’s a video introduction to theming ContentBox Websites:

http://www.coldbox.org/media/cbdw2013#1_3

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Good day to everyone

OMG, this thread goes into a wrong direction. I think, my question was not understood yet. I’m talking about pages and not blog. Okay? Pages and not Blog**.**
Since a while we can have excerpts on pages, Therefore we need a link “read more” to point to the full page, right?

@Luis: Your code snippet is valid for the blog.
@Andy @Brad: Thanks for pointing this out and letting me feel like an idiot.

So, who is able to create a link “read more” to the full page if the excerpt is rendered to the screen? How do you identify the full page?

Maybe you wanna check out the examples layouts to doing this. Bad luck, they are written before the excerpt feature for the pages was born, so we have no examples.

cheers

Martin,

The way to display Pages and Blogs are the same, yes Luis posted for Entries, but if you replace entry with page you will have the same thing, but again looking at the code for ContentBox you would have seen that the baseContent.cfc contains the renderExcerpt and renderContent, which Pages and Entries both extend.

Enough said…

Yes, i know this. if i do the stuff below, it would create a link to itself. The difference to the blog is, that we have e.g index and entry view and we can really make the difference between an excerpt and its full post. Getting the full page of a blog entry is not more than adding the slug to the url. The pages are working different. We don’t have this.

So please indentify the full page for me.

`
<cfif prc.page.hasExcerpt() and cb.isPageView()>

#prc.page.getExcerpt()#

Read more and not this again

#prc.page.renderContent()#

`

Hi Martin–

I think I see what you’re saying. Since there’s no isIndexView() equivalent for pages, the excerpt section will always render as the only context for a page…is the page itself. There is no equivalent to the rollup page that the blog has.

Thanks Joel, hurray somebody understands me :wink:

How can i proceed to create a link somehow?

Off the top of my head, the only thing I can think of would be to append something to the query string to toggle the view…which creates an ugly URL for your full content page.

Maybe you could transform the menu links to point to a query string version for the excerpt, and have the clean URL be the full content.

Hmm, i don’t like this idea. This sounds to me, that nobody ever is using this and was never tested it? I don’t think, that a functionality leaves the house without a proof of concept and a proof of implemention.

Let’s wait and see what Luis has to say. I think, a helper function is needed,which gets the full article out of the deep of ContentBox. In some way it must be possbile without hacks.

Cheers

I agree it’s not good. But as the logic is run off the url, I think there’d have to be something to make the toggle.

Why not just render both the excerpt and the full content, and toggle with Javascript?

Javascript is actually not a real option for me. To be consistence, also the blog part should be changed to this kind of navigation. Secondly, a Javascript based link will not work on screenreaders and braille keyboards. To fullfill these requirements, a regular anchor based link must be available. Our websites are done 100% “barrier free” in the past and i will not change that.

Cheers

Martin,

Just maybe you need to take a step back and have a look how you asked your question to begin with, then if you sat down and actually said that I am trying to do this and having issues instead it might be a different story. It looks like you are trying to do something that is not supported, but we don’t know that as all you said and I quote

Like in the blog, i want to create a link “Reade more” to get the full page from an excerpt. My problem is to create link: cb.linkPage(cb.getCurrentPage()) makes no sense, it points to itself.

Any idea, how to reach the full page?

From that you where given the answer to the question, everyone answered your initial question.

The question is still the same as i asked in the very first post. My english is not perfect, but it sounds very clear to me.
You’re right, the question is now answered: It isn’t possible to create a link pointing to the full page.

So if it a creation of a “read-more” link is not supported, why has ContentBox this feature having excerpt and and a page, or long version, if you like, when the page can never be reached after reading the excerpt by not having a “read more” link?

Cheers

Martin,

Maybe you can explain what it is you are trying to do, if you are trying to do the same thing that the blog entries do then it is achievable. If you want a page that lists all the excerpts like the blog does and you click the link to display the full page then I believe the answer we gave is correct.

Could you be kind enough to explain the exact issue you are trying, for example, when I create the page display I am getting a list of all the page excerpts, but when I click the read more it won’t display the full page. But it sounded like you weren’t getting that far, hence your initial question.

The creation of the read-more is supported, and we have shown that to you. However, we are not mind readers and can only answer based on your question and your problem, if the solution to the problem is the way you are not explaining what you are trying to do, is not our problem. We gave you the solution, well before you got very rude about it.

Joel, but there is isPageView which will do the same thing.

isPageView() is not analogous to isIndexView(), from what I can see, which is the problem that Martin is facing.