In my news application I normally post in HTML and from 14 September started inserting a
sequence to ensure a non-breaking space appears in my articles. (My boat's name is "Just 17" and I don't want the word and number split.) When I look at the application's summary page listing recent posts I find that the non-breaking space code appears literally and is not converted to a space, non-breaking or otherwise. Is there a trick I can use to overcome this problem?
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted. |
I'll check it and come back to you.
Nabble staff. We never ask for passwords.
|
In reply to this post by GregChapman
This is a tricky issue, let me try to explain. As you know, the snippet text is the post message trimmed. We have to first convert the message into the text format and then trim it. This step is needed because if the message is in HTML format, then there would be some chance of cutting an HTML tag in half (e.g., "<font...") and break the whole HTML of the page (making it look broken/weird).
The easiest solution I see here is this: we created for Harvey44 some NAML code to let the author define an independent snippet for each post. So instead of trimming the text, it gets the snippet from a special section. Basically you should write the post like this: {summary_start} This is the snippet of the post. Here you can write anything. {summary_end} This is the body of the post.If you think this is a nice feature, I can make it available from the "Extras & add-ons" page. So you could enable that add-on and specific the snippet you want. Two things to remember: 1) If you don't specify the start/end_summary tags, then it will trim the text as it always did (default behavior). This is good because you don't have to write custom summaries for every post (just for those that need some special touch); 2) The summary/snippet is placed without modification, so you can use HTML tags in that section without problems. Please let me know what you think. |
Thanks, Hugo, for the explanation.
I had assumed that all you could do was treat the non-breaking space code as a special case that you could parse for and then treat as a standard space (obviously that would split my boat name at the end of a line but I felt would still look neater than leaving the code in). However, your solution is far more refined and flexible. Just to be clear, can you confirm that it means that if I use the {summary} tags, then the text within them is reserved for use on the News Summary page and does not appear on the Main Article page. Regardless of that answer, Yes please! Let's go with your proposal!
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted. |
Further Thought:
If the {summary} is to be reserved for the News Summary page and not posted as part of the main article, does this also mean that I could include a photograph in it that would not be used on the Main Article page. (This would also imply that I could select a photograph of my choice to be used as the summary picture and not be limited to the first one to appear in the main article.)
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted. |
Is the
{summary_start} This is the snippet of the post. Here you can write anything. {summary_end} This is the body of the post.solution ready to test yet? Perhaps I should have tried it?
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted. |
Yes, the solution is ready for everyone. First you should go to "Options > Application > Extras & Add-ons" and then enable the "Content | Custom summary for Newspaper" add-on. Then you can use those tags in your newspaper app.
Yes, that text is used on the front page only (it is not displayed on the article page). Yes, the picture will be displayed on the front page, but not on the article page (unless you duplicate the tag and leave one copy in the article body). |
Just one problem!
In my embedded application, with font size set via CSS at 1em and width restricted to around 750px, the CONTENT tab on the "Options > Application > Extras & Add-ons" is so long I lose the second half of the instruction and access to the SAVE button at the bottom. See: http://www.gregafloat.plus.com/blog/index.html (I managed to reveal the SAVE button by hitting TAB after placing the checkmark in the correct box, but it's hardly ideal!)
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted. |
Thanks for reporting this issue. It will be fixed after the next release. For now – yes – people should click on another tab to make the save button visible.
|
Free forum by Nabble | Edit this page |