foxhound |
|
---|---|
I am trying to display the choosen news category description on my index and I am not sure how I can retrieve it. Is there a way for me to get the choosen new category description (so the description if you for example view this news: index.php?c=news_arma2oa_general on the index) to display on my homepage? <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
---|---|
Use {PAGE_ROW_CATDESC} in your news.tpl file inside the PAGE_ROW block. |
foxhound |
|
---|---|
Yes, I know I could use that. Problem is, I cant use it in the ROW block as I wrote above :) I guess I will have to make some tries and see if I can follow my plan when adding it inside the ROW block :) <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Twiebie |
|
---|---|
Ah, sorry I misread that. What exactly do you mean with ''I need to refer to the selected category in the index"? |
Kort |
|
---|---|
Not sure if that is exactly what you need: {PHP.structure.page.news.desc} Alternatively you might be able to do the job via HTML-coding / jQuery SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
foxhound |
|
---|---|
Ok, let me write a few examples to try and clear up :) This so people can "see where they are, which news they are currently viewing". {PAGE_ROW_CATDESC} does not work on the index.tpl so thats why I was looking for other tags or php globals. ;) I hope that makes more sense. @Kort,
Maybe, but than I think an IF block inside the ROW is easier to work with. But that requires some testing first :) <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Kort |
|
---|---|
If you need a global for current category description, use {PHP.cat.desc} SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
foxhound |
|
---|---|
That global does not exist. At least not for me when I check with : {PHP|dump} <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Kort |
|
---|---|
Did you check? SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
foxhound |
|
---|---|
Not yet Kort, I need to install 0.9.16 on a seperate area and see if with that version the PHP dump outputs the {PHP.cat.desc}. I will let you know, I should be able to perform an additional install this weekend. Added 2 days later: I just installed 0.9.16 and there does not exist a global called "{PHP.cat.desc}". <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
|
Dit bericht is bewerkt door foxhound (2014-01-26 15:33, 11 jaren ago) |
Kort |
|
---|---|
Did you TRY to use it? SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
foxhound |
|
---|---|
Yes, of course I tried it to see the output. I guess I should have told you the results of that, I forgot sorry. <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
Kort |
|
---|---|
Which template did you use it in? SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
foxhound |
|
---|---|
Tested in the default template nemesis but also in my own. And the result is always the same (see post #12). <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|