Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Hello there, im new here
for first all, sorry if my english bad. isny my main language.

i want to ask about foldertitle, and i got some confused there.
i tried to put
Code: Select all
<cms:show k_page_foldertitle />

new1.PNG
new1.PNG (31.9 KiB) Viewed 1122 times


and want to add the css color in every NEWS category, but i dont know how to do it become automaticly in every NEWS category
new2.PNG
new2.PNG (15.05 KiB) Viewed 1122 times


hope this community can help me
Hi,

There can be several ways of doing this but in all you'll eventually have to declare the required classes in your CSS.

One way would be to use the 'k_page_foldername' (this is derived from 'k_page_foldertitle') variable; for example -
suppose the folder-name is 'my-folder', you can output the class as -
Code: Select all
<div class="<cms:show k_page_foldername />">
   <cms:show k_page_foldertitle />
</div>

Code: Select all
and then in CSS -
.my-folder{
   background-color: blue;
}

Does this answer your query?
KK wrote:
Code: Select all
<div class="<cms:show k_page_foldername />">
   <cms:show k_page_foldertitle />
</div>

Code: Select all
and then in CSS -
.my-folder{
   background-color: blue;
}

Does this answer your query?


@KK
thx for your response sir,
after i got some clue from @genxcoder, now its work
this is the code
Code: Select all
<span class="nk-post-categories">
   <cms:if k_page_foldername = "news">
      <span class="bg-main-1">
   </cms:if>
   <cms:if k_page_foldername = "updates">
      <span class="bg-main-6">
   </cms:if>
   <cms:if k_page_foldername = "events">
      <span class="bg-main-3">
   </cms:if>
   <cms:if k_page_foldername = "patchlog">
      <span class="bg-main-5">
   </cms:if>
   <cms:show k_page_foldertitle />
   </span>
</span>
I am glad it helped :)
4 posts Page 1 of 1
cron