plainblack.com
Username Password
search
Bookmark and Share

    

if can edit

User julied
Date 9/3/2009 2:10 pm
Views 562
Rating 1    Rate [
|
]
Previous · Next
User Message
julied

We are setting up a portal and want to tie in some of the content of our webgui site into it. In order to get just the article to display, I'm creating a shortcut on a separate page and using the url for the shortcut. Then I'm overriding the display of the title and the style display. The problem is that if someone is logged into both webgui and the portal, they get the edit controls. I've created a template that can be used to not display the admin console. I'm okay with the edit controls showing up if the person has capability to edit the asset - typically most of the time that will only be me. However, even if you don't have edit capability the border indicating the asset is a shortcut shows up if they have admin turned on. I'd like to add in something like <tmpl_if canEdit><div with border> so that only the person with edit control sees the shortcut border. I've looked around but I'm not finding a tmpl_if similar to this. The syndicated content has one for if user can post but I need if user can edit.

--- (Edited on 9/3/2009 2:10 pm [GMT-0500] by julied) ---



Back to Top
Rate [
|
]
 
 
rogier

However, even if you don't have edit capability the border indicating the asset is a shortcut shows up if they have admin turned on. I'd like to add in something like <tmpl_if canEdit><div with border> so that only the person with edit control sees the shortcut border. I've looked around but I'm not finding a tmpl_if similar to this. The syndicated content has one for if user can post but I need if user can edit.

A shortcut has a template. Edit the shortcut and look in the "display tab". There you can see where to change the template.

To achieve what you want, first make a copy of the default shortcut template and select it in your shortcut.

In that copy you can remove all the html that causes the border to appear, which is almost everything exept for the controls and the content var:

<tmpl_if session.var.adminOn>
    <p><tmpl_var controls></p>
</tmpl_if>

<tmpl_var shortcut.content>

 

Another option is to put the html in the GroupText macro. Then you can show the border to a specific group only. Like this:

...

 

I recommend not putting a whole chunk of html into the macro, but just removing it from the (copied) template.

 

One more thing: if you format your question into paragraphs instead of a blob of text, you might get a quicker answer :-)

 

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 18-09-2009 23:10 [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 
    



© 2012 Plain Black Corporation | All Rights Reserved