Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking and Color #20

Open
DowntownScience opened this issue Mar 18, 2015 · 2 comments
Open

Linking and Color #20

DowntownScience opened this issue Mar 18, 2015 · 2 comments

Comments

@DowntownScience
Copy link

Got everything working now! Thanks for the module!

In the Block>Settings tab there is a free form text field named "Link". What is the intended usage of this field? I entered a URL in hopes that it would link the image that I inserted, but the image only enlarges when clicked. I have got around this by adding the image into the "Main" tab, but was mostly curious if I'm using this correctly.

Is there a way to create more space between blocks? if so, which file do I modify?

Is there a way to add a colored border to blocks? I looked through block.css, but didn't see any reference to any color values. I looked at the ContentBlockModule.css file as well and do see references to color but wasn't sure if this was for CMS only or if it's just not applying.

Thanks in advance for your help regarding these questions. I have uploaded a picture of a page I made using your module. Keep in mind that I'm very much a Noob!

capture

@thomasbnielsen
Copy link
Owner

Glad you got it working.

The link field is just a field that you can use if you want. Just add $Link in your template, where you want your link string.

Could also do

<% if $Link %><a href="$Link">Click here</a><% end_if %>

Edit:
The rest of your questions, just add some css in your main css file or put it inside block.css
You could give all block templates a class and then target that class.

@DowntownScience
Copy link
Author

Thanks for the reply. I added the line of code you pasted into your reply to the block template (after the second end_if) I was using but then I just get a "Click Here" link at the bottom of the picture. It does link to where I wanted it to though. I moved the code inside the "end_loop" for Images, but then I have the same visually but it links to the picture like before.

How can I make the actual Image be the focus point for the link? I want the end user to be able to click the picture or even the entire block and then have it take them to the linked page.

Haven't messed with the CSS yet, but if I just want to have my blocks take on the styling of my "Simple" theme can I copy/paste everything from block.css into layout.css or form.css?

Thanks. I clearly need to read up on the Silverstripe/PHP model and how it all works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants