HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


comcode page to replace the top template

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#32123 (In Topic #7291)
Avatar

Community saint

How would I go about replacing it with a comcode page like the side panels but on top?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32125
Avatar

Hi,

Create a Comcode page called panel_top in whatever zone you are changing. If you want to have the same panel in multiple zones create redirects appropriately. Edit the TOP template accordingly; blank it out if you like.
You may wish to move this part of the GLOBAL template to the top of that template (it is currently part-way down, beneath the page-title/breadcrumbs):

Code

   {+START,IF_NON_EMPTY,{$GET,panel_top}}
      <div>
         {$GET,panel_top}
      </div>
   {+END}


All this said, I wouldn't do it like this myself. It would be a lot easier just to blank out the TOP template and rewrite it, than writing a Comcode page and setting up lots of redirections; plus you probably want to use HTML rather than Comcode, so replacing the TOP template allows you to do this directly.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#32127
Avatar

Community saint

I want to be able to put blocks in the top bar is why I want to do this.
So could I just blank out the top template and add that code you showed above. Or what code would I put in there so it shows a comcode page?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32128
Avatar

You can put blocks in templates using the BLOCK symbol. For example:

Code

[block="foo" something="bar"]example[/block]
becomes:

Code

{$BLOCK,block=example,param=foo,something=bar}
(that's just an example of how to convert the notations– there's no block actually named example, that takes those parameters)
This is what you have been doing already with the side_stored_menu block, and it has been working; it's just the CSS it uses does not fit well with the CSS that gets called up around the default TOP template, so it looks wrong unless that template/CSS is rewritten/removed/replaced.

So could I just blank out the top template and add that code you showed above. Or what code would I put in there so it shows a comcode page?

There are various things you could do to put Comcode pages into templates (such as using the LOAD_PANEL symbol, or just doing the process I indicated in my last post). However the code I indicated in my last post is a part of the GLOBAL template, not something that is for use anywhere - it relies on other code in that template.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#32129
Avatar

Community saint

I know about how to do blocks that way but as you mentioned in another post the CSS renders those incorrectly for what I wish to do.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32131
Avatar

Comcode pages compile to exactly the same Tempcode that templates compile to- the BLOCK symbol was actually originally created because compiled Comcode uses it.

The issue here is not with blocks, or Comcode, or symbols - it's purely to do with the CSS that the default TOP template uses. Infact, I've just run a little test. I removed the contents of the TOP template and put in the same block symbol I used before, and it worked perfectly :).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#32132
Avatar

Community saint

The drop down block, the one I was having trouble with?
So I would have to remove every thing?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32135
Avatar

Community saint

hmm it does work except for one problem the edit menu is on a lower level, so I need to change that with out changing the side panel menus and at this time I am not sure how to do that.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#32141
Avatar

So I would have to remove every thing?

I'm actually not sure the exact CSS properties causing the problem, but in principle, no. CSS is unfortunately ungodly in it's complexity, but we're bound to the web standards, so there's not much we can do.


To move the link, well this is the MENU_STAFF_LINK template in 3.2:

Code

{+START,IF,{$AND,{$NEQ,{TYPE},top},{$NEQ,{TYPE},zone}}}
<br />
<div class="edit_menu_link">
   <a href="{EDIT_URL*}" title="{NAME*}">{!EDIT_MENU}</a>
   <img class="blend inline_image" alt="" src="{$IMG*,menus/menu}" />
</div>
{+END}
{+START,IF,{$NOT,{$AND,{$NEQ,{TYPE},top},{$NEQ,{TYPE},zone}}}}
   &nbsp; <span class="associated_details">[ <a href="{EDIT_URL*}" title="{NAME*}">{!EDIT_MENU}</a> ]</span>
{+END}

Try this one…

Code

{+START,IF,{$AND,{$NEQ,{TYPE},dropdown},{$NEQ,{TYPE},top},{$NEQ,{TYPE},zone}}}
<br />
<div class="edit_menu_link">
   <a href="{EDIT_URL*}" title="{NAME*}">{!EDIT_MENU}</a>
   <img class="blend inline_image" alt="" src="{$IMG*,menus/menu}" />
</div>
{+END}
{+START,IF,{$NOT,{$NEQ,{TYPE},dropdown},{$AND,{$NEQ,{TYPE},top},{$NEQ,{TYPE},zone}}}}
   &nbsp; <span class="associated_details">[ <a href="{EDIT_URL*}" title="{NAME*}">{!EDIT_MENU}</a> ]</span>
{+END}

Infact, I'll put that change into 3.2, as it makes sense.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#32144
Avatar

Community saint

oh ok coolies thanks. I really can not wait until 3.2, I am using it even though its still beta cuz of these reasons.
1. faster
2. members are not complaining of needing to log in twice (That may have been a cookie issue)
3. The gallery is so much better.
4. catalogues are so much better
5. I still have not found to many bugs, heck I have to do things I would not normally do to find them and even then I found its just me not doing some thing right.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: