- Posts: 26
- Thank you received: 0
Tags only show after "read more"
- dmolina
- Topic Author
- Offline
- Junior Member
Less
More
8 years 2 months ago #2393
by dmolina
Tags only show after "read more" was created by dmolina
Hi, how can i put the tags after "read more", in blog/category view?
Thanks!
Thanks!
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
8 years 2 months ago #2395
by andrea_4g
Replied by andrea_4g on topic Tags only show after "read more"
That's impractical to do.
CP Tags are rendered inside the article text block.
The readmore element is rendered after the text block.
There could be "tricks" to position _visually_ the readmore before the tags, but more likely than not it would be a not-very-reliable solution.
CP Tags are rendered inside the article text block.
The readmore element is rendered after the text block.
There could be "tricks" to position _visually_ the readmore before the tags, but more likely than not it would be a not-very-reliable solution.
Please Log in or Create an account to join the conversation.
- dmolina
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
8 years 2 months ago #2398
by dmolina
Replied by dmolina on topic Tags only show after "read more"
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
8 years 2 months ago - 8 years 2 months ago #2399
by andrea_4g
Replied by andrea_4g on topic Tags only show after "read more"
Here's a more detailed explanation.
The 'readmore element' is not part of the text of the article.
In fact, when the readmore element is placed into into the content of the article, the article text is split in two parts and stored into two separate database fields: introtext and fulltext (neither of which contains the '<hr id="system-readmore" />' element.
With that in mind let's see how the category/blog view1 renders the intro_text part of the content item:
CP Tags are injected into the intro_text2. The position depends by parameter 'Tags Position' in CP Tags plugin.
If you choose Bottom, they're appended to the introtext, if you choose Top they're prepended, if you choose Custom they're inserted where the {cptags} placeholder is located.
In any case CP Tags become part of the 'intro_text', which is rendered *before* the readmore element.
Thats why you can't have CP Tags rendered after the readmore.
1) the file I'm referring to is: components/com_content/views/category/tmpl/blog_item.php
2) this is true in category/blog view; when in single article view CP Tags are inject into 'intro_text'+'fulltext'
The 'readmore element' is not part of the text of the article.
In fact, when the readmore element is placed into into the content of the article, the article text is split in two parts and stored into two separate database fields: introtext and fulltext (neither of which contains the '<hr id="system-readmore" />' element.
With that in mind let's see how the category/blog view1 renders the intro_text part of the content item:
Code:
print the_title
if(some_conditions_are_met)
{
print some_info_about_the_article //(info block, print icons, etc)
}
print intro_image; //(if present)
print intro_text;
if(some_conditions_are_met)
{
print readmore;
}
...
CP Tags are injected into the intro_text2. The position depends by parameter 'Tags Position' in CP Tags plugin.
If you choose Bottom, they're appended to the introtext, if you choose Top they're prepended, if you choose Custom they're inserted where the {cptags} placeholder is located.
In any case CP Tags become part of the 'intro_text', which is rendered *before* the readmore element.
Thats why you can't have CP Tags rendered after the readmore.
1) the file I'm referring to is: components/com_content/views/category/tmpl/blog_item.php
2) this is true in category/blog view; when in single article view CP Tags are inject into 'intro_text'+'fulltext'
Last edit: 8 years 2 months ago by andrea_4g.
Please Log in or Create an account to join the conversation.
- dmolina
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
- Thank you received: 0
8 years 1 month ago - 8 years 1 month ago #2405
by dmolina
Replied by dmolina on topic Tags only show after "read more"
Ok Andrea, thank you so much for your detailed answer.
Finally i try to put this on /media/customproperties/css/customproperties.css:
.blog .cp-tags{
display: none;
}
Maybe is not the best option, but works!
Finally i try to put this on /media/customproperties/css/customproperties.css:
.blog .cp-tags{
display: none;
}
Maybe is not the best option, but works!
Last edit: 8 years 1 month ago by dmolina.
Please Log in or Create an account to join the conversation.
- andrea_4g
- Offline
- Administrator
Less
More
- Posts: 1122
- Thank you received: 163
8 years 1 month ago - 8 years 1 month ago #2407
by andrea_4g
Replied by andrea_4g on topic Tags only show after "read more"
If you want stop injecting CP Tags into the articles - instead of simply hiding them - you can disable the CPTags content plugin.
(CP Tags will be be still displayed under CP search results).
Edit: alternately you can set parameter 'Tags only in detail view' to Yes in 'Content - Custom Properties Tags Plugin'
(CP Tags will be be still displayed under CP search results).
Edit: alternately you can set parameter 'Tags only in detail view' to Yes in 'Content - Custom Properties Tags Plugin'
Last edit: 8 years 1 month ago by andrea_4g. Reason: added a second suggestion
The following user(s) said Thank You: dmolina
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds