gteigland VIP
Total posts: 159
11 Jul 2016 19:49

So I purchased your latest cobalt version to make sure it wasn't an updating issue. I got the everthing pack. But for the life of me I cannot figure out why my listing template is not making changes. Which is weird because as you know I've used your product for over a year and have done a ton of templating etc. But for this new site I am not able to make template customizations with RECORDS Listing. The record templated worked great as you can see by this link:

http://dev.mckcamera.com/index.php?option=com_cobalt& ;view=record&id=29:mck-235code&Itemid=127

SO that worked great but I'm not able to do the same for records listing.

My goal is simple I want to edit the records listing php file so the items and look the way i want them to. I completely understand how to chose what fields that it shows via intro but I need more customization than this. So here's what I did.

  1. Go to Cobalt 8/templates/Article List
  2. copy blog template and name it "mck-listing-camera
  3. Went to sections/sectionname/General Parameters/ Record List and select mck-listing-camera as my template. So I can configure everthing in backend and works they way I want.

HOWEVER WHEN I TRY TO CUSTOMIZE THE TEMPLATE in the php file -- it just doesn't seem to work. 1. I go to com_cobalt/views/records/tmpl/default_list_mck-listing-camera.php 2. I try to edit for example any h2 tags to h3 and when I refresh page nothing happens 3. More immportantly I try to call in fieldbyid (as I want to put the image ahead of title) and nothing shows even though I'm asking the code from your documentation and my prior site that it worked for. 4. I even tried to delete the "title" references in that file just to see if I can delete the title of the record in records view but nothing works. Bascialy I can't edit the php file to create a customize template of records in my site.

I'm so confused as this easily worked before -- Like I said I just purchased your lastest version so I'm hoping this will allow some feedback to help with this. Also i did the EXACT SAME PROCESS with the single records view and as by the link you can see I was able to custoomize the template.

Thanks for your help. I've attached ftp and backend credenetials to help diagnosis this.

Last Modified: 25 Jul 2016


Sergey
Total posts: 13,748
12 Jul 2016 05:49

Ну я сделал тоже самое и все работает. зайди в камеры.

Я только переименовал шаблон и зменил - на _. На всякий случай. Может это было причиной.


gteigland VIP
Total posts: 159
12 Jul 2016 06:19

What?? not english...


Sergey
Total posts: 13,748
12 Jul 2016 13:59

I did the same as you have described and everything works. Open Cameras link and you will see text. I only change - to _ in template name just in case.


gteigland VIP
Total posts: 159
12 Jul 2016 14:18

THanks for your response and while yes I can put some custom text in like you did I can not edit the items in the record listing. For example I can't style the title or put the title underneath the picture. I dont understand why this is not working but worked on my last site when I follow the exact same procedure.

I need to able to rearrange the fields on records listing and did that before but using keyid which is also not working.

Thanks


gteigland VIP
Total posts: 159
13 Jul 2016 21:15

Any word on this? I am not able to do a simple edit to put the Title below the image on the listing records. Nothing takes... thanks


gteigland VIP
Total posts: 159
15 Jul 2016 20:04

I FIGURED OUT HOW ITS HAPPENING BUT NO IDEA HOW TO FIX IT. But to me it seems like a bug let me explain:

  1. So for continuity and example I am deleting this piece of code to remove title. Obviously you can do this from the backend BUT I'm doing this to demostrate the issue in editing templates now.\n\n
  2. So I choose blog view and delete thes lines of code

<h2> <?php if($params->get('tmpl_core.item_title')):?> <?php if(in_array($params->get('tmpl_core.item_link'), $obj->user->getAuthorisedViewLevels())):?> <a <?php echo $item->nofollow ? 'rel="nofollow"' : '';?> href="/<?php echo JRoute::_($item->url);?>"> <?php echo $item->title?> </a> <?php else :?> <?php echo $item->title?> <?php endif;?> <?php endif;?> <?php echo CEventsHelper::showNum('record', $item->id);?> </h2>

  1. This removed the title from records listing. So I know editing the php files works.

  2. Now I want to make my own template using the blog template as a reference. So I I copy and rename the blog template to my own as instructed.

  3. When I delete that exact code in my new template it does not remove the title. Yes I selected the new template in record list. Even with the new template selected -- if i delete that title code in the original blog tempalte it removes it from the page EVEN THOUGH I HAVE THE NEW TEMPLATE SELECTED!

Yes I have everything updated to the latest versions.

Please advise.


gteigland VIP
Total posts: 159
15 Jul 2016 20:15

So more clarification. I am able to do EXACTLY what I want by editing the originaly blog template but if I try to copy the template to create my own and SELECT that new template under my section templates -- whatever editing i do in NEW TEMPLATE FILES -- it does not work.


pepperstreet VIP
Total posts: 3,837
15 Jul 2016 22:34

gteigland So more clarification. I am able to do EXACTLY what I want by editing the originaly blog template but if I try to copy the template to create my own and SELECT that new template under my section templates -- whatever editing i do in NEW TEMPLATE FILES -- it does not work.

Hello, I am really curious about your experiences and issue...
are you really sure that the list template (that you are viewing on the listing) is your NEW COPY?

Please, try this: Select BOTH templates in section parameters to get the "template switcher" in frontend.
Try to switch between the 2 versions... do you see any effect? Can you switch between the different templates and do you see your edits?


I remember, that something is stored in your session. Maybe this is the cause of your edit issues: If you just change from 1 template to the other in BACKEND. You might NOT see the actual changes, because your list is still using the previous template. With only 1 selected list template you might have to logout/login to see a change...


gteigland VIP
Total posts: 159
16 Jul 2016 12:52

Here's how I know.. when I delete the WHOLE CODE for the listing file on my new template in php -- all the listings disppear on the frontend (as they should). That's what got me so confused. Also when I try to put the field id with unset in the new template listing php file that also does NOT work but when I put in that same code in the original blog php listing it does work. That's what I am working off of now to do my work.

But yes your suggestion on switching templates while doing those edits is exactly how I figured out this issue.

If need any additional credentials from me to look at this further please let me know.


Sergey
Total posts: 13,748
24 Jul 2016 05:16

Templates are part of session state. When you change template in backend, try to login/logoff on frontend to be sure Cobalt does not show you old template that is saved in state.


gteigland VIP
Total posts: 159
25 Jul 2016 20:49

ok thanks I'll give that a shot and let you know.

Powered by Cobalt