What does hasCustomExcerpt refer to?
-
November 18, 2020 at 10:52 pm #4566[anonymous]
On the page https://getpublii.com/dev/post-tags/ I see the post tag:
{{hasCustomExcerpt}}
What does this refer to?
I have poked around and found nothing so far.
November 19, 2020 at 6:36 am #4568BobIf you want to view more than just an excerpt, you can use the Read More button in the editors. Then the selected part of your post will be displayed in place of the excerpt: https://getpublii.com/docs/post-editor.html#readmore
November 19, 2020 at 6:53 am #4569[anonymous]Thanks for the reply.
I will have to fiddle about to see if this answers my latest question.
Cheers!!
November 19, 2020 at 5:21 pm #4587[anonymous]It seems that…
{{excerpt}}
…is not available to the tag page which is where I would want to use it.
November 19, 2020 at 5:32 pm #4588BobIt is related to posts, also displayed on the tag pages.
November 19, 2020 at 5:43 pm #4589[anonymous]It does not seem to be available in the head section — head.hbs. Is this the case?
November 19, 2020 at 5:53 pm #4590BobIt must work here:
{{#if hasCustomExcerpt}}{{{ excerpt }}}{{else}}{{{ excerpt }}}{{/if}}
November 19, 2020 at 6:17 pm #4591November 19, 2020 at 7:06 pm #4594BobI don’t know why it doesn’t work for you, I would have to access the files to see all the code, etc … but I don’t really have time right now to debug what’s wrong.
November 19, 2020 at 7:36 pm #4595[anonymous]Thanks!
I get that you do not want to debug the code. I am sure you are busy.
Cheers!!
November 19, 2020 at 11:56 pm #4597[anonymous]Okay. I created a textarea under postConfiq and it seems to work within the post body, however, not within the head.hbs.
This leads me to believe that {{excerpt}} and the textarea text I created are not available within partials.
I can see a real need for this. This could be important for schema markup and possibly other interesting uses.
Are there any other avenues to chase down to achieve my goal??
Cheers!!
November 20, 2020 at 2:38 am #4599BobI don’t feel like arguing, as I said, it works very well here, what you can check here: https://demo.getpublii.eu/themes/q-answer/1/tags/api/
{ "@type": "Question", "name": "Highlight your code syntax with Prism.js", "acceptedAnswer": { "@type": "Answer", "text": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent viverra nec ligula non cursus. Vestibulum tellus elit, auctor luctus ligula eget, egestas venenatis purus. Nulla at tortor tristique est egestas viverra ac non risus. Curabitur euismod ut urna a pulvinar. Praesent vel nisi vitae felis dictum luctus. Phasellus id velit non tortor porttitor tempor. Etiam accumsan urna ac leo hendrerit fermentum.</p> <h2>Translations API</h2> <p>Quisque viverra dapibus metus, quis pulvinar massa ultricies sed. In lobortis imperdiet dui non tempus. Aenean vel accumsan erat. Fusce gravida et odio vel convallis. Aenean convallis sagittis ligula at imperdiet. Pellentesque fringilla arcu eu elit convallis, nec euismod neque molestie. Pellentesque imperdiet porta ligula, sed fringilla massa. </p> <h3>Introductions</h3> <p>Phasellus at nisl eu turpis tincidunt posuere non non odio. Nullam luctus arcu non orci pretium vehicula et sit amet augue. Proin ac rhoncus nibh, et maximus lacus. Ut risus elit, cursus eget libero sit amet, aliquet iaculis augue. Integer non quam lectus.</p> " } }
In terms of using postConfig outside the post context, use postViewConfig https://getpublii.com/dev/post-config-options/#where-can-it-be-used
November 20, 2020 at 7:09 pm #4606[anonymous]Good Lord- Whos arguing?
I asked, If I was missing something?
Clearly I was. I was asking for guidance to help find the answers. Keep in mind, I am an old-school coder, however, when something is new, you are over-washed with too much information in too many places. Connecting the dots when they are all over the place, one can easily miss something simple. I was asking, What am I missing? That is all. You answered that today.
I really do appreciate your help. I am sorry you feel frustrated as you clearly seem to be. That was surely not my intent. Believe me I get it. I have been on your side of the fence before.
Keep in mind, if I did not think the world of your product, and you for that matter, I would not have looked so long for a solution. I am choosing Publii for for some of my work over my own fully object.oriented CMS that I wrote primarily for large-scale automated sites serving very many millions of pages — though fully capable of serving small sites too. In fact, it served all of my sites. I just shut down one hack attempt research site a couple of years ago with over 50 million pages. Just think, Publii is my top choice for the rest of my work. That means — you are clearly doing something right.
Chin-up buddy! You’re okay. You are doing good work — and I appreciate it.
Cheers!!
November 20, 2020 at 7:25 pm #4607Bobpublii-slpa wrote:Good Lord- Whos arguing?
Hehe, sometimes I lose my nerves, that’s true, especially when I see such messages: https://github.com/GetPublii/Publii/issues/600#issuecomment-717569407
Back to the topic, I am fallible but I am also a co-creator of Publii so please trust me when I say something should work or not. Please send me your site backup, I will try to check it this weekend.
November 20, 2020 at 8:03 pm #4610[anonymous]Bob-
I trusted you when you said it should work.
I got it — finally. You gave be a clue this morning that I somehow missed.
I will update the other post to include more details on what I have done with code so that others can do the same thing.
I know I was frustrating! Believe me, I get it! The fault lies on my end too. Trust me, I see it. I apologize. I can be obtuse. 😉
Congratulations on such an impressive app. It is truly fascinating! It is extremely well imagined. Great job!
Cheers!!
April 18, 2021 at 5:46 pm #5642[anonymous]Hi @publii-slpa,
I was wondering if you could share your findings regarding hasCustomExcerpt
I am trying to display excerpts for selected posts in hero image slider on the frontpage. However, using excerpt would truncate according to the “Excerpt length” in the theme’s basic settings. The “Excerpt length” for each post may not be desirable as the truncation may happen in odd places of a sentence which is not too elegant.
If those selected posts have customExcerpt, then it would be possible to display the desired excerpt text completely.
Thanks!