WebSite X5Help Center

 
Tonnie S.
Tonnie S.
User

How can I add a row in a blog article page?  en

Autore: Tonnie S.
Visite 325, Followers 1, Condiviso 0  
Parole Chiave: blog,website x5 pro 2025.3

In my website i have page with a blog widget. It looks like the first attachment. When i click on the button  <Alles lezen> then the page with the blog article is shown. On that page, I'd also like to see the red row "Verhalen geschreven door onze leden" How do I do this?

Postato il
11 RISPOSTE - 1 UTILE - 1 CORRETTO
Tonnie S.
Tonnie S.
User
Autore

Leggi di più
Postato il da Tonnie S.
Daniel W.
Daniel W.
User
Utente del mese DEUtente del mese EN

There was a similar question a few months ago, but I don't remember what solution was found.

KolAsim may have had a solution, but I can't say for sure.

Leggi di più
Postato il da Daniel W.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese PL

(It < En)  ... without a LINK it cannot be evaluated...
... there are dozens of different ways depending on the page configuration and layout...
... however, this simple code for the BLOG page might work:

<style>
#imContent{margin-top:40px;}
#imContent:after {content:"Bla bla bla"; position:absolute;width:100%;top:-40px; height:35px;background-color:red;text-align:center;font-size:24px;padding-top:5px;color:yellow}
</style>

.

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Tonnie S.
Tonnie S.
User
Autore

This code works, thank you. The code in my website is now:

<style>

#imContent{margin-top:58px;}
#imContent:after {content:"Blog: De oude doos"; position:absolute;width:100%;top:-42px; height:60px;background-color:#f21b06;text-align:center;font-size:26px;font-style: italic;padding-top:17px;color:white}


</style>

There is one problem. All blogs are getting a row with the text "Blog: De oude doos". That's not wat i want. For every blog i want an extra row with te text "Blog: <blogname>". Is there a solution for? With a variable or so?

My website is https://tonnie-stevens.websitex5.me/

Leggi di più
Postato il da Tonnie S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese PL

...if you only need the code for the BLOG, you need to remove the code you're using now from where you put it...
...to apply the code only to the BLOG, in Step 3 you need to select the Bl.og Special Page, at the bottom of the page list, open the Properties section, and in the Code section, in the option before the closing of the /HEAD tag, paste your current code...

.

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Daniel W.
Daniel W.
User
Utente del mese DEUtente del mese EN

@KolAsim: If I understand correctly, each blog article should have a different title in the red stripe.

Leggi di più
Postato il da Daniel W.
Tonnie S.
Tonnie S.
User
Autore

Yes, that's what i want.

Leggi di più
Postato il da Tonnie S.
Daniel W.
Daniel W.
User
Utente del mese DEUtente del mese EN

It seems that the title and cover image for the blog articles were set to display: none and now the title should appear in the red stripe again.

Maybe KolAsim can trick it with CSS and Javascript to achieve the desired result.

Leggi di più
Postato il da Daniel W.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese PL

...OK...

...delete  the previous code, which wasn't inserted in the section I indicated...
...replace  the previous code with this new code of mine:

<style>
#imContent{margin-top:60px;}
#imContent::after {content: var(--after-text, "Blog: De oude doos"); position: absolute; width: 100%;top: -50px; height: 60px;background-color: #f21b06;text-align: center;font-size: 26px;font-style: italic;padding-top: 17px;color: white;
/*K*/}
</style>

...place this code in the correct section, that is, in the Blog Properties in the third option: Before closing the HEAD tag.
...
...to have a different title for each post in the EXTRA banner, in the second tab, the "Contents" tab of the post text, you must enable the text for HTML code with the relevant menu button [</>];
- in the first line of the text in a continuous string, without breaks and without any formatting, paste this code of mine:
<script> /*K*/$('#imContent').css('--after-text', '"New Title for this Article"');/**K**/</script>

.

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
Tonnie S.
Tonnie S.
User
Autore

Thank you @KolAsim, this code works. But i have now a new problem. For that problem i have started a new discussion. 

Leggi di più
Postato il da Tonnie S.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese PL

... OK ... ciao

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪