Please help me with Custom Skins
I am trying to hyperlink from the frontpage to a new skin which will contain an existing story (about). I created a new story
skin because I want a unique maskhead/header for that story.
I thought the solution to the problem was to use custom skins, but I can't link to the new story skin. There are numerous prototype custom skins and I have searched for documentation about them, but I haven't found anything. I also tried to link to the new skin through trial and error selecting the available macros listed in the help
for each skin, but I couldn't get it to work even after looking at the macro documentation. Lastly , I tried using the < % story % > macro but I could not get it to use my skin as the preferred skin.
Please help me solve this problem and if you could also explain how to join these new skins together I would be grateful too.
Thanks in Advance
John
dm42
skins are used to render macros (but the story content cannot be used to select a certain skin) - better save the said story with the topic 'about' and link to that topic from the frontpage.
JohnWalsh
Thanks for your response. Skins use macros and I used the embedded story macro to select my own skin successfully, i.e.
[Macro not allowed in sandbox: story]
. However, when I tried to create a link with[Macro not allowed in sandbox: story]
antville ignored my skin and used its own full story skin. It seems hardcoded. Am I using the wrong macro? What flexibility does custom skins offer? How do I use skins?dm42
hmm, maybe its just a misconception - or i got something wrong ?
when you create a "link" you do something like
<a href=".../storyid">linktext</a>
- no?there is no way to tell the link which skin the target should use.
you can tell the story to use a certain skin - but you can only define that inside another skin - which is a completely static solution (its like you paste some text in some format into a certain position of a 'template').
*kris* once made an experiment with embedding a story into the main template which worked great - whenever he changed the story content, that part changed in the main template too. Essentially this is like an 'Include'.
Antville includes any template inside the main template (this is the way the skins are built now). If you want to change that, you will need to create every distinct template as a standalone template (like the 'main page') and put only this line into the main page skin (as 'main page' is called on every request):
[Macro not allowed in sandbox: response.body]
I am not sure anyone has done that before...
JohnWalsh
I don't understand why antville offers custom skins when their potential is so limited. Thanks for your suggestion - I think I know what you mean and I'll give it a try.
dm42
Today 'template' is used to better describe the whole thing.
JohnWalsh
It is not possible to have unique skins/different HTML code for different skins such as frontpage, fullstoryview etc. because the search results skin and reply comment skins are always encapsulated in the main skin rather than the skin in which these actions are invoked. To support unique skins, the main skin contains no HTML code inside
body
tag, which means the reply and search results are generated with no maskhead etc. around them. This is a warning to anybody else who wants to try this method to create unique design for each page e.g. different maskhead graphics, sidebars for each skin.I can use a combination of CSS and the story.id and topic.id macros to use different graphics based on story and topic, but I haven't found a macro to identify the current skin used like frontpage etc.
At the end of the day, I am quite frustrated at the inflexibility of the skins and I don't see the how custom skins help. It wouldn't be an issue if the search/reply skins were more flexible
blue sky
...with the search/result page since I'm using a background image for the whole page which is shining through between stories (= "main content" div is transparent).
To have
1) search form,
2) "number of results line" and
3) search result list
on a white background together, I would need an embracing skin for all the three to put them into one div element. Especially because number 2) and 3) are only conditionally on the page, and 2) has no skin to manipulate at all, so other ways to put them on a white background separately will fail, or end up with a bunch of not-closed tags e.g. when the search yielded no results to list.
Where is the overall search page "skin" incl. site.searchform, number of results and story.searchview defined? It would be really great if it was accessible to the site admin.
blue sky
Add-on: Another item for which I cannot find any definition within the skins, but which is always magically inserted: the comment anchor <a name="[number]"></a> (appears at the beginning of each comment). I came across it because it throws a warning in Tidy (XHTML wants anchors to have the "id" attribute filled, too).