Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > CSS Image Call on Custom form layout. Access Denied? View modes: 
User avatar
Member
Member
vcarter - 7/16/2013 11:06:52 AM
   
CSS Image Call on Custom form layout. Access Denied?
I am using a custom form layout for one of my document types. This form is using jQuery tabs. That functionality is working as expected.

I am also using a style block at the top of the custom form layout source to keep the design clean and simple. In the style definition there is a reference to an image
#tabs-min .ui-tabs-nav .ui-state-active { 
background: transparent url("[ImagePathReference]/uiTabsArrow.png") no-repeat bottom center;
border: none;
}

My issue is with the [ImagePathReference]. If I simply use the WSYWIG and insert an image into the body of my form, the image displays with no problem on the page. If I copy the path of that image into the above style definition nothing happens. Looking at the Console output for the page I am seeing:
[sitepath]/CMSMessages/AccessDenied.aspx?resstring=The%20dialo…ers%20are%20not%20consistent,%20please%20try%20to%20reopen%20the%20dialog. 403 (Forbidden)

Removing my call from the CSS makes that go away. Any information about what permission I may be violating would be appreciated.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 7/24/2013 5:50:44 PM
   
RE:CSS Image Call on Custom form layout. Access Denied?
Hello,

Could you please tell me what exactly do you want to achieve? Why you want to use the [ImagePathReference] in CSS file? You can try to use some macro instead.
Where is the image stored?

Best Regards,
Martin Danko

User avatar
Member
Member
vcarter - 7/25/2013 8:52:53 AM
   
RE:CSS Image Call on Custom form layout. Access Denied?
[ImagePathReference] was just shorthand for my example so I didn't expose any actual path information in my post.

I am using jQuery tabs on a custom document form(the form content editors use) for organizational purposes. In order to do this I added some script at the top of my form as well as some style information, the styles that I added use an image, so I was trying to figure out how to reference it on the actual custom for for display. Everything else works great but the image path seems to be wrong, or possibly not able to be reference within CMSDesk on a custom form.

It is not a huge deal, just something to make it nicer for the content editors.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 7/25/2013 4:55:25 PM
   
RE:CSS Image Call on Custom form layout. Access Denied?
I've found the only way to get my images to work properly using the built-in CSS editor is to specify the full path to the image in the stylesheet. For instance if your images were here: /App_Themes/SiteName/images You'd reference the image like so in your stylesheet: ../../App_Themes/SiteName/images/image1.png

User avatar
Member
Member
vcarter - 7/26/2013 9:09:43 AM
   
RE:CSS Image Call on Custom form layout. Access Denied?
That is how my general styles are done for public display. This is a form for editing an actual document. I created a custom layout for the form and added some styling directly to the top of the for HTML since I was having trouble getting Kentico to use my styles over the CMS styles.

So at the top of the source for my custom form I have:

<script>[calling the jquery UI]</script>
<style>[Styling my tabs]</style>

[Custom Form]

Works great and allows me to keep everything together. Only problem was a missing image in my tabs. Not a big deal, but I was curious as to why I could add the image to the source using the editor, but could not get the correct path to use in the style block.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 7/29/2013 9:22:02 AM
   
RE:CSS Image Call on Custom form layout. Access Denied?
Have you used Firebug or F12 in Internet Explorer and looked at the rendered HTML and CSS to see what you have and debug your path issue from there?

User avatar
Member
Member
vcarter - 7/29/2013 1:35:35 PM
   
RE:CSS Image Call on Custom form layout. Access Denied?
I will need to check it again but I am pretty sure the path seemed correct(to the point where copying and pasting the path displayed the image in the browser). Sadly this image issue is being bumped while I build out another section. Thanks for your assistance.