"Unable to locate declaration"

Post anything about TopStyle here. NOTE: TopStyle has been discontinued.

Moderator: TopStyle Support

Post Reply
wbmcns
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 2
Joined: Thu Feb 28, 2013 8:14 am

"Unable to locate declaration"

Post by wbmcns » Thu Feb 28, 2013 12:50 pm

Hi there,
I am testing the software and unsure if my configuration should work in the first place but maybe you can help me out?
Here are some issues I've encountered in the few hours of testing:

TopStyle is not making declarations linked to styles.css in php files that are included in the web page files. F.ex. when you have a file index.php where you php-include a footer (footer.php), the declarations are found for the index.php but not for the footer.php and clicking any in the latter file causes "Unable to locate declaration" error message.

Another scenario with problems seems to be when the stylesheets are included in the index.php via another file f.ex. like this:

Code: Select all

<?php $file = "stylesheets.php"; include ( $file ); ?>
This causes declarations not to be clickable in index.php.
I have been trying to circumvent this by using Root Alias -setting but that does not seem to have an effect. I am using WAMP with virtual hosts (server1.local, server2.local etc) and cannot find a way to tell the software that in one of my sites the styles.css can be found at C:\wamp\www\server1.local\site\subfolder\styles.css

Any help would be very much appreciated. :)

User avatar
TopStyle Support
Rank VI - Professional
Rank VI - Professional
Posts: 507
Joined: Sat Jun 13, 2009 12:38 pm
Contact:

Re: "Unable to locate declaration"

Post by TopStyle Support » Fri Mar 08, 2013 3:11 pm

You'll need to create a file named TopStyle.cfg in the directory where your HTML doc is.

This TopStyle.cfg should look something like this:

[links]
C:\Users\wbmcns\Desktop\1.css
C:\Users\wbmcns\Desktop\2.css

You can add as many links to other style sheets as you like. Here are the rules:
* they need to be under the [links] section
* they need to exist

If you're planning on adding relative links, here are some additional rules:
* a relative link should not contain any path (no forward or backward slashes), or
* a relative link should start with ./ or .\

wbmcns
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 2
Joined: Thu Feb 28, 2013 8:14 am

Re: "Unable to locate declaration"

Post by wbmcns » Wed Mar 13, 2013 5:23 pm

Wonderful - it works. Thank you!

Post Reply