Please forgive this newbie question.
How do you edit some of the Ditto presentation? Other snippets have a CSS folder which you can dig into etc.
I have just started using Ditto. Specifically I want to experiment/change the styling (make smaller) of the following:
h3.ditto_pageTitle
div.ditto_document
div.ditto_intro text etc.
So far I have not found how to access these. So I am looking for a safe procedure here. I know some CSS but very little PHP...
Thanks!
-
☆ A M B ☆
- 24,524 Posts
You can style Ditto’s parts any way you like; you can even make up your own template to display the listing. Just put the css in your site’s css file. As far as I know, the default ditto template isn’t styled at all. You can find the default template in the lang files.
When creating custom template chunks, I always copy the default template into a chunk and specify it in the snippet’s &tpl parameter, then modify the template to my liking. That way I start with a known good template!
Thanks Guys,
So, to get my head around this a little clearer: What I should do is copy the above CSS and add it to my custom template CSS and then mess around with it until I have the fields in question the way I want them to look? If so then I am excited with the prospect as CSS is within my "comfort zone". Following the cryptic snippet calls, variables, and PHP code etc is where I usually get lost...
Max
-
☆ A M B ☆
- 24,524 Posts
Exactly. And your browser’s "view source" will be your friend, as will Firebug or some other dev plugin to Firefox to work with CSS
Unless you want to do something really exotic, you should never have to mess with the core code in the main snippets (wayfinder, ditto). Making a custom template chunk is simply HTML with placeholders, and it’s all styled with CSS.
If you find the snippet parameters get overwhelming, look into using a config file instead. Just set the desired parameters in a very straightforward manner; you can even add comments so you know what each one is at a glance:
$parents = '43,34'; // parent documents to get individual items from
$tpl = 'mychunk'; // chunk to use for the output of each summary item
Then the only parameter you need in the snippet tags is &config=`configfile`
Thanks Susan,
I added the CSS from the code that David posted. But I did not see the specific CSS classes that I was encountering on my Ditto created page. In the end I added the specific classes to the CSS file in my own main Template CSS and was able to adjust the presentation with ease from then on.
What sent me off course was my previous encounters with actual CSS files that were packaged with other snippets. In essence I as a newbie would have been lost without this wonderful forum. Without this forum how would a new user know how to modify the appearance of some of these snippets? To my untrained eye there seems to be different approaches with the various snippets. But the more you play with MOD the more you learn!
As to your suggestion to using the config files as an alternative to snippet parameters I am afraid I am not getting what you saying. This is not your fault. Rather it is mine. The gaping holes in my knowledge of scripting, code language and PHP is wide enough to drive a large truck though. I am simply lacking here. I know photography, Photoshop, InDesign, layout, XHTML, CSS and a few other gems. When I read insightful suggestions by yourself, Ryan, Doze and others and it feels like I have been hit by one of those "phases on stun" blasts we used to see on the old Star Trek TV show. A short statement that might seem as direct as spelling the word "cat" to some folks is a mere mirage to an unenlightened idiot like myself.
Still, I am enjoying MODx in my spare time, peeling off one layer at a time. The fact remains I need to read some text so I can begin to understand what everyone here is actually talking about...
Thanks,
Max